"Marc G. Fournier" <scrappy@postgresql.org> writes:
> # ALTER TABLE table ALTER COLUMN field1 type boolean;
> ERROR: column "field1" cannot be cast to type "pg_catalog.bool"
> Should this not work?
No, because there's no built-in cast from smallint to bool. You could
do something like
... type boolean using case when field1=0 then false else true end;
regards, tom lane