Fwd: Re: [GENERAL] Howto change column length

From: Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Fwd: Re: [GENERAL] Howto change column length
Date: 2001-11-07 14:30:00
Message-ID: 4.2.0.58.20011107152901.00de16e0@pop.freesurf.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hello all,

This is a copy from Admin explaining how to change variable lenght:

>If you're willing to do a little magic to the system tables (and you have
>a recent backup :) ). You can change the atttypmod of the column in
>question from 14 to 24. This really only works on variable length items
>and only to expand them, but...
>
>You pretty much need to do a sequence like:
>select oid, relname from pg_class where relname='<tablename>';
>update pg_attribute set atttypmod=24 where attrelid=<oid from previous>
> and attname='<attributename>'
>in a superuser account.

Best regards,
Jean-Michel POURE

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2001-11-07 14:46:40 Re: Fwd: Re: [GENERAL] Howto change column leng
Previous Message Tom Lane 2001-11-06 21:09:57 Re: Use of Serial Datatype and Sequence Issue