Changing the size of a varchar field

From: Eric Ridge <ebr(at)tcdi(dot)com>
To: postgres-general(at)postgresql(dot)org
Subject: Changing the size of a varchar field
Date: 2004-05-06 14:08:44
Message-ID: E283A8CE-9F66-11D8-9FA4-000A95BB5944@tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Using PG 7.3.x, how stupid is this:

UPDATE pg_attribute SET atttypmod=<new size + 4> WHERE ....;

I had to do this on a database, and surprisingly it seems to have
worked just fine. The columns accept a larger value, the existing
values are still intact, and I've seen no other strange errors...

Am I living dangerously, or is this an "okay" thing to do?

eric

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2004-05-06 14:28:33 Re: Embedded SQL inherently faster than others?
Previous Message Tom Lane 2004-05-06 12:11:47 Re: select for update & lock contention