Re: Resize varchar column

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Resize varchar column
Дата
Msg-id 20040204150859.GA19840@wolff.to
обсуждение исходный текст
Ответ на Resize varchar column  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Ответы Re: Resize varchar column  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Re: Resize varchar column  (Dirk Försterling <r@zorbla.de>)
Список pgsql-general
On Wed, Feb 04, 2004 at 14:45:37 -0000,
  John Sidney-Woollett <johnsw@wardbrook.com> wrote:
> Is it possible to alter a table to resize a varchar column? The PG docs
> indicate lots of uses for "alter table T alter column C..." but not one
> that allows the changing of the type (or same type, new size).
>
> This is possible in Oracle (provided you are increasing the column size).
>
> Is there a way to resize the column without having to drop or recreate the
> table or column?

It is possible to change the size of varchar data by updating the system
catalogs. I don't know the exact details of what to do, but the instructions
should be in the archives (multiple times).

In general (in 7.4.x) you can change data types using add, drop, rename and
a query to copy/translate the data. This will have the side effect of making
the updated column the last column when using * to refer to the table's columns.

В списке pgsql-general по дате отправления:

Предыдущее
От: "John Sidney-Woollett"
Дата:
Сообщение: Resize varchar column
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Anyone has nls activated on Mac OS X?