Re: Changing the size of a varchar field - Mailing list pgsql-general

From Tom Lane
Subject Re: Changing the size of a varchar field
Date
Msg-id 1161.1083861653@sss.pgh.pa.us
Whole thread Raw
In response to Changing the size of a varchar field  (Eric Ridge <ebr@tcdi.com>)
Responses Re: Changing the size of a varchar field
List pgsql-general
Eric Ridge <ebr@tcdi.com> writes:
> Using PG 7.3.x, how stupid is this:
>     UPDATE pg_attribute SET atttypmod=<new size + 4> WHERE ....;

It'll work okay for a varchar column (not char) at least as far as the
table itself is concerned.  I think there are some issues for views
referencing the column, possibly also indexes.

            regards, tom lane

pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: Re: select for update & lock contention
Next
From: Jerry LeVan
Date:
Subject: Announce: PgBrowse-0.9