Re: Modifying column size

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Modifying column size
Дата
Msg-id 20020719150925.D85491-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Modifying column size  ("Susan Lane" <suel@dpn.com>)
Список pgsql-general
On Fri, 19 Jul 2002, Susan Lane wrote:

> I was wondering if anyone here knew of a way to modify the size of a column
> in Postgres.  In Oracle, you can use the following syntax:
>
>     alter table usrs modify passwd varchar2(32);    (For Postgres, I changed
> the datatype to varchar)
>
> But, when I try this in psql, it doesn't like the modify keyword.  I looked
> in the documentation, and I found a doc note that someone else had tried
> this as well to no avail.  Anybody know what is the correct syntax or if
> this can even be done in Postgres?

In general, not really (as per other answers).

For the specific cases of varchar of one size to varchar of a larger size,
you can do so with some system table hacking.  In general, unless you've
got constraints/views/etc to prevent you from making a new table, copying
the data and renaming, I'd suggest against it.  (If you really want to
know, you can ask about it specifically or better yet, check the archives
:) )




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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: brk() function and performance
Следующее
От: "Susan Lane"
Дата:
Сообщение: Re: Modifying column size