Обсуждение: Fwd: Re: [GENERAL] Howto change column length

Поиск
Список
Период
Сортировка

Fwd: Re: [GENERAL] Howto change column length

От
Jean-Michel POURE
Дата:
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