From: | "Brent R(dot) Matzelle" <bmatzelle(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How do I change data type from text to bool? |
Date: | 2001-02-20 15:59:20 |
Message-ID: | 20010220155920.5631.qmail@web314.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)braman(at)yale(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-20 16:16:49 | Re: Re[2]: Weird indices |
Previous Message | Robert Kernell | 2001-02-20 15:51:01 | copying tables |