Re: altering a column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: treat00(at)yahoo(dot)com (Thomas Reat)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: altering a column
Date: 2004-01-05 05:32:24
Message-ID: 21924.1073280744@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

treat00(at)yahoo(dot)com (Thomas Reat) writes:
> I need to change a varchar(32) to varchar(1024). It is a primary key
> that many tables reference. How do I do this without reloading the
> entire database?

When your back is to the wall, you can hack the pg_attribute.atttypmod
for the column (this is sufficient in this particular case). See
archives for discussion, and please heed the advice to experiment in
a scratch database.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2004-01-05 05:45:43 Re: Is my MySQL Gaining ?
Previous Message Tom Lane 2004-01-05 05:19:10 Re: GetLastInsertID ?