From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: In-place conversion of type bool |
Date: | 2008-08-14 13:40:30 |
Message-ID: | 20080814134030.GA4232@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Joost Kraaijeveld wrote:
> > ALTER TABLE ... ALTER COLUMN TYPE might help you. Use the USING clause
> > if you need a non-default data conversion -- in this case it might look
> > like USING (col = '1') or some such.
>
> ALTER TABLE odbcdest ALTER COLUMN odbc_bool TYPE bool
>
> gives:
>
> ERROR: column "odbc_bool" cannot be cast to type "bool"
You need a USING clause, as Tom suggests above (even giving an example).
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Gauthier, Dave | 2008-08-14 13:43:44 | Re: Strange query plan |
Previous Message | Scott Marlowe | 2008-08-14 13:38:13 | Re: Newbie [CentOS 5.2] service postgresql initdb |