Re: ALTER TABLE...ALTER COLUMN vs inheritance

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: ALTER TABLE...ALTER COLUMN vs inheritance
Дата
Msg-id 34d269d40911161000g46bfa76v7ce8b857b8db3b90@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ALTER TABLE...ALTER COLUMN vs inheritance  (Bernd Helmle <mailings@oopsware.de>)
Ответы Re: ALTER TABLE...ALTER COLUMN vs inheritance
Re: ALTER TABLE...ALTER COLUMN vs inheritance
Список pgsql-hackers
On Thu, Nov 12, 2009 at 11:56, Bernd Helmle <mailings@oopsware.de> wrote:
> I've just started looking into this and wonder how this should look like.

IIRC another motivation for moving them into pg_constraint was we
could then give them names as required by the spec (unless I got mixed
up with defaults).  Looking at the 2003 spec I don't see any grammar
for that, so either I cant find it (likely) or its not there.  Either
way I see something like the below options:

ALTER TABLE ALTER COLUMN ADD CONSTRAINT my_not_null NOT NULL;
[ we dont currently support add constraint on ALTER COLUMN AFAICT...
but it might be nice? ]
-or-
ALTER TABLE ADD CONSTRAINT my_not_null NOT NULL (column);
-or-
ALTER TABLE ALTER COLUMN column SET NOT NULL 'name';

Comments?

Anyway Bernd if you are working on this great!  If not lemme know, Ill
plan on having something for the next commit feast.  Though I still
may never get around to it :(.

FYI defaults have the same problem.   Would it be awkward would it be
to use pg_constraint for the book keeping as well? [ and by that I
really mean ALTER TABLE ADD CONSTRAINT my_default DEFAULT .... so you
can give them a name ]


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ORDER BY vs. volatile functions
Следующее
От: Chris Browne
Дата:
Сообщение: Re: next CommitFest