"Marc G. Fournier" <[EMAIL PROTECTED]> 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
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org