Re: change column length, is it that hard? - Mailing list pgsql-novice

From Tom Lane
Subject Re: change column length, is it that hard?
Date
Msg-id 8066.1122754785@sss.pgh.pa.us
Whole thread Raw
In response to change column length, is it that hard?  (Ron Arts <ron.arts@neonova.nl>)
Responses qucik timestamp questions
timestamp timezone problem
List pgsql-novice
Ron Arts <ron.arts@neonova.nl> writes:
> One of the tables contains a field username character varying(16)
> that needs to become varying(40), so just a little longer.

The traditional solution to this is to hack the pg_attribute.atttypmod
value for the column.  I *strongly* recommend practicing on a scratch
database before you do this for real --- wrapping the whole thing in a
transaction so you can roll it back is a good idea, too.

> NOTICE:  rule _RETURN on view ox_deps depends on table contact column username
> NOTICE:  view ox_deps depends on rule _RETURN on view ox_deps

If you've got dependent views then you need to think about whether their
output column types need to change too.

            regards, tom lane

pgsql-novice by date:

Previous
From: Ron Arts
Date:
Subject: change column length, is it that hard?
Next
From: Ron Arts
Date:
Subject: Re: change column length, is it that hard?