PSQLException: ERROR: failed to find conversion function from unknown to char

sql语句报错

PSQLException: ERROR: failed to find conversion function from unknown to char ;
PSQLException: ERROR: failed to find conversion function from unknown to char

原因

使用union的时候,查询的常量字段必须 使用类型型转化函数,比如::int、::text