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

From Eric Ridge
Subject Changing the size of a varchar field
Date
Msg-id E283A8CE-9F66-11D8-9FA4-000A95BB5944@tcdi.com
Whole thread Raw
Responses Re: Changing the size of a varchar field  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Load Balancing and Backup
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Embedded SQL inherently faster than others?