Re: In-place conversion of type bool

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: In-place conversion of type bool
Дата
Msg-id 20080814134030.GA4232@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: In-place conversion of type bool  ("Joost Kraaijeveld" <J.Kraaijeveld@Askesis.nl>)
Список 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Newbie [CentOS 5.2] service postgresql initdb
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: Strange query plan