Re: Resize varchar column - Mailing list pgsql-general

From John Sidney-Woollett
Subject Re: Resize varchar column
Date
Msg-id 3070.192.168.0.64.1075914674.squirrel@mercury.wardbrook.com
Whole thread Raw
In response to Re: Resize varchar column  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton said:
> The message (one of them anyway) you want is:
>
> http://archives.postgresql.org/pgsql-general/2001-10/msg01208.php
>
> Try and find something more recent though, in case anything important has
> changed. Oh, and do take Tom's advice about the backup.

Thanks, that's great.

It would be nice if there was a command available that would do simple
column resizes (upwards), or even data type changes (assuming no implied
data truncation), ie

alter table T alter column X varchar(x);

where x is the new size, and x > old size;

In fact, looking at your URL above (and using the technique explained), it
may be possible to create a function that does this.

I wonder if it works, though, if there is an index on the column...

Anyway, this time, I dropped and recreated the table as this is a test
system. But reinstating all the objects that referenced that table was a
pain!

Thanks again.

John Sidney-Woollett

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Resize varchar column
Next
From: Guy Fraser
Date:
Subject: Re: Copy and xml files