In-place conversion of type bool

From: "Joost Kraaijeveld" <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: "PostgreSQL" <pgsql-general(at)postgresql(dot)org>
Subject: In-place conversion of type bool
Date: 2008-08-13 18:15:20
Message-ID: 1218651320.906.40.camel@panoramix.askesis.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am converting a database to PostgreSQL. I use ODBC to create the
PostgreSQL database and copy the data.

The database says that it's bool implementation is char(1), just as
PostgreSQL does. I can copy te data OK, but I would like to change the
actual type of the column from char(1) to bool. Is that possible without
copying the column to a temporary column, dropping the old column and
renaming the temporary columns to the old column?

I also have another table that has mac addresses stored *exactly* in the
same format as PostgreSQL macaddr type that are used as primary key and
dropping that key would mean a major headache. In this case I would like
to be able to change the type from varchar to macaddr.

TIA

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2008-08-13 18:44:06 Re: automatic REINDEX-ing
Previous Message RASHA OSMAN 2008-08-13 17:44:21 Re: Response time between shared buffer cache and operating system