报错信息:ERROR:operator
does not exist: text = integer;
解决方法:CREATE CAST (text AS integer) WITH INOUT
AS IMPLICIT;
用法示例:CREATE TABLE test_cast(id text); INSERT INTO
test_cast VALUES(888); SELECT * FROM test_cast aa WHERE id > 888;-->执行失败CREATE CAST (text AS integer)
WITH INOUT AS IMPLICIT; SELECT * FROM test_cast aa WHERE id > 888;
-->执行成功。