Re: Is it safe to increase pg_attribute.atttypmod ? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Is it safe to increase pg_attribute.atttypmod ?
Date
Msg-id 16447.1021940235@sss.pgh.pa.us
Whole thread Raw
In response to Is it safe to increase pg_attribute.atttypmod ?  ("Nick Fankhauser" <nickf@ontko.com>)
Responses Re: Is it safe to increase pg_attribute.atttypmod ?
List pgsql-admin
"Nick Fankhauser" <nickf@ontko.com> writes:
> The update to change a varchar(10) field to varchar(40) looked like this:

> update pg_attribute set atttypmod = 44
> where attrelid = ( select oid from pg_class where relname = 'test' )
> and attname = 'oldtest' ;

> Is this a smart thing to do?

Yup, that's the standard hack.

            regards, tom lane

pgsql-admin by date:

Previous
From: "Jameson C. Burt"
Date:
Subject: Access by 1000 users to view postgres tables without recreating accounts?
Next
From: Joe Conway
Date:
Subject: Re: Is it safe to increase pg_attribute.atttypmod ?