03-postgresql报错ERROR: operator does not exist: numeric = character varyin

现在要把数据库换成postgresql,但在转换过程中发现postgresql对传入的参数类型匹配相当严格。

如select * from user where a= #b#

假设a类型为numeric,而传入的b为string的话postgresql就会报错:

--- Cause: org.postgresql.util.PSQLException: ERROR: operator does not exist: numeric = character varying
  建议:No operator matches the given name and argument type(s). You might need to add explicit type
 casts.
  位置:125
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: numeric = character varying
  建议:No operator matc

你可能感兴趣的:(数据库-PostgreSQL)