Re: Alter table syntax

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Alter table syntax
Дата
Msg-id 20021023133900.GA2294@dcc.uchile.cl
обсуждение исходный текст
Ответ на Alter table syntax  (Garo Hussenjian <garo@xapnet.com>)
Список pgsql-general
On Tue, Oct 22, 2002 at 11:38:33PM -0700, Garo Hussenjian wrote:
> Hello,
>
> Can anyone remind me how to make a column 'not null' after it is created?

ALTER TABLE ... ADD NOT NULL
But I think this is a 7.3 addition (i.e. not released yet).

If you don't have that, you can try looking up it's pg_attribute tuple
(it was shown here in the last week how to do so, AFAIR) and set to true
its attnotnull.

Be warned that incorrectly modifying system catalogs can lead to massive
data loss!  Are you scared already?  If so, take all needed precautions
and go ahead.  If you don't, start imagining people yelling at you
because of a lost database and start again.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La espina, desde que nace, ya pincha" (Proverbio africano)

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Online backup
Следующее
От: "Erwan DUROSELLE"
Дата:
Сообщение: Rép. : Re: Alter table syntax