mysql转postgres 字段定义备忘
create or replace function bool_to_int(boolean) returns int2 as $$ select CAST($1::int as int2); $$ language sql strict; create cast (bool as int2) with function bool_to_int(boolean) as implicit;create or replace function bool_to_int(boolean) returns int2 as $$ select CAST($1::int as int2); $$ language sql strict; create cast (bool as int2) with function bool_to_int(boolean) as implicit;