比如users表字段id为integer。
users
id
integer
sql: select * from users where id = '1'或 'string'
select * from users where id = '1'
'string'
会报数据类型错误。有没有什么方法或配置让postgresql对于类似SQL直接返回NULL结果呢?
NULL
operator does not exist: character varying = integer