--创建类型转换
CREATE CAST (INTEGER AS VARCHAR) WITH INOUT AS IMPLICIT;
CREATE CAST (VARCHAR AS INTEGER) WITH INOUT AS IMPLICIT;
--查询当前的类型转换
select
(select typname from pg_type where oid = t.castsource) as "castsource",
(select typname from pg_type where oid = t.casttarget) as "casttarget",
castcontext,
castmethod
fro