In-place conversion of type bool - Mailing list pgsql-general

From Joost Kraaijeveld
Subject In-place conversion of type bool
Date
Msg-id 1218651320.906.40.camel@panoramix.askesis.nl
Whole thread Raw
Responses Re: In-place conversion of type bool  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: RASHA OSMAN
Date:
Subject: Re: Response time between shared buffer cache and operating system
Next
From: Martijn van Oosterhout
Date:
Subject: Re: automatic REINDEX-ing