When running the program in the background, the database reports an error ERROR: COALESCE types character varying and integer cannot be matched
In coalesce(b.chk_type,-1)
, b.chk_type
is a character type, which does not match -1
It is recommended that the string '-1'
will be used
Or convert the field to a numeric type, depending on the situation