Re: How do I change data type from text to bool?

Поиск
Список
Период
Сортировка
От Brent R. Matzelle
Тема Re: How do I change data type from text to bool?
Дата
Msg-id 20010220155920.5631.qmail@web314.mail.yahoo.com
обсуждение исходный текст
Ответ на How do I change data type from text to bool?  ("Donald Braman" <donald.braman@yale.edu>)
Список pgsql-general
There currently is no simple SQL command that accomplishes this.
 It can be accomplished by creating an identical new table with
the bool data type change and then running a "INSERT INTO
new_table (SELECT * FROM old_table)".  Then you can check your
results, drop the old table, and rename the new one.

Brent

--- Donald Braman <donald.braman@yale.edu> wrote:
> I have a table/class filled with records/instances in which I
> accidentally
> set the fields/attributes data type to text rather than
> boolean. I now have
> 75,000 records with 't' and 'f' So now I want to change the
> attributes to
> bool? I can't find anything on changing data types in the
> integrated docs (I
> searched them, didn't read all of them). Did I miss it? Is
> there an easy way
> to do this? -Don
>


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

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

Предыдущее
От: Emmanuel Pierre
Дата:
Сообщение: number of pgsql childrens
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re[2]: Weird indices