Re: Changing column data type on an existing table - Mailing list pgsql-general

From Richard Huxton
Subject Re: Changing column data type on an existing table
Date
Msg-id 4285B419.5060108@archonet.com
Whole thread Raw
In response to Changing column data type on an existing table  (Joe Audette <joe_audette@yahoo.com>)
List pgsql-general
Joe Audette wrote:
> Hi,
>
> I have an app that I released with a particular field
> as varchar 255.
>
> Can someone give me a script example I can use to make
> an upgrade script to change it to text or at least to
> larger varchar without losing existing data?

Others have answered for version 8.

If you are running one of the 7.x releases, you should google for
"pg_attribute atttypmod" and see how you can change that value to extend
varchars.

HTH

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Russell Smith
Date:
Subject: Re: pgplsh on postgresql 8.0.2
Next
From: Jack Orenstein
Date:
Subject: Why is psql \copy process stuck?