Re: How do I change data type from text to bool? - Mailing list pgsql-general

From Brent R. Matzelle
Subject Re: How do I change data type from text to bool?
Date
Msg-id 20010220155920.5631.qmail@web314.mail.yahoo.com
Whole thread Raw
In response to How do I change data type from text to bool?  ("Donald Braman" <donald.braman@yale.edu>)
List 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 by date:

Previous
From: Emmanuel Pierre
Date:
Subject: number of pgsql childrens
Next
From: Tom Lane
Date:
Subject: Re: Re[2]: Weird indices