Re: Changing the size of a varchar field

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Ridge <ebr(at)tcdi(dot)com>
Cc: postgres-general(at)postgresql(dot)org
Subject: Re: Changing the size of a varchar field
Date: 2004-05-06 16:40:53
Message-ID: 1161.1083861653@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric Ridge <ebr(at)tcdi(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jared Evans 2004-05-06 17:46:11 7.2 or 7.4 for critical data?
Previous Message Ed L. 2004-05-06 16:40:18 Re: select for update & lock contention