Re: best practice transitioning from one datatype to another

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: CG <cgg007(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: best practice transitioning from one datatype to another
Date: 2009-07-15 23:05:47
Message-ID: 7105.1247699147@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CG <cgg007(at)yahoo(dot)com> writes:
> While transitioning from 8.1 to 8.4, I need totransition tothe internal UUID type in place of the contrib/uniqueidentifier module. I've built the database around uniqueidentifier, so nearly every table has one column of that data type. It's going to be tedious to

> ALTER TABLE foo ALTER COLUMN bar SET DATA TYPE uuid;
> ...repeat 600 times...

> I'llalso have to dropand reload theviews and the rules on tables. It'll be tedious even if the tables have no data in them.

> Can anyone recommenda better/faster way to make the transition?

Couldn't you rename the type to uuid in the 8.1 database before you
dump?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ANdreas Wenk 2009-07-15 23:12:05 psql \du
Previous Message Scott Marlowe 2009-07-15 21:55:36 Areca 1680 and RHEL/Centos 5.3 issue