-- so INSERT VALUES with 0/1 for BOOLEAN columns work like SQL Server BIT. UPDATE pg_cast SET castcontext = 'i' WHERE castsource = 'integer'::regtype AND casttarget = 'boolean'::regtype; ...