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

From: "Stefan Waidele jun(dot)" <St(dot)Waidele(dot)jun(at)Krone-Neuenburg(dot)de>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How do I change data type from text to bool?
Date: 2001-02-20 09:06:42
Message-ID: 5.0.2.1.0.20010220100346.01bdc060@imap.Krone-Neuenburg.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

At 18:39 19.02.2001 -0500, Donald Braman 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

You might have to pg_dump the table, change the definition in the dump,
drop the table and recreate it with in psql with \i

I am not the great expert on this. I think there are not all SQL-Specials
restored the way they were. With a plain table without triggers et. al. it
should be alright.

If I missed something, please tell me,

Stefan

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joseph 2001-02-20 11:56:28 Re: ODBC linked table in access on second pc
Previous Message Stefan Waidele jun. 2001-02-20 09:03:18 Re: ODBC linked table in access on second pc