Search Postgresql Archives

Re: In-place conversion of type bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux