Обсуждение: altering a column

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

altering a column

От
treat00@yahoo.com (Thomas Reat)
Дата:
I need to change a varchar(32) to varchar(1024). It is a primary key
that many tables reference. How do I do this without reloading the
entire database?

Re: altering a column

От
Tom Lane
Дата:
treat00@yahoo.com (Thomas Reat) writes:
> I need to change a varchar(32) to varchar(1024). It is a primary key
> that many tables reference. How do I do this without reloading the
> entire database?

When your back is to the wall, you can hack the pg_attribute.atttypmod
for the column (this is sufficient in this particular case).  See
archives for discussion, and please heed the advice to experiment in
a scratch database.

            regards, tom lane