ALTER TABLE .... make constraint DEFERRABLE

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема ALTER TABLE .... make constraint DEFERRABLE
Дата
Msg-id 1269265188.8481.513.camel@ebony
обсуждение исходный текст
Ответы Re: ALTER TABLE .... make constraint DEFERRABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ALTER TABLE .... make constraint DEFERRABLE  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Deferrable unique constraints seem an interesting feature, though I have
either some questions or some issues, not sure which.

I don't seem to be able to find any way to do an ALTER TABLE that adds
this new capability to an existing table.

There is no way to add a constraint via a CREATE TABLE AS SELECT, so
that means there is no way to use the feature at all in that case.

Also, foreign keys can't be defined that refer to a deferrable primary
key. That isn't mentioned at all in the manual with regard to the
DEFERRABLE clause, though it is mentioned in the FK section. You get
this error message
ERROR:  cannot use a deferrable unique constraint for referenced table

The use case for this feature looks a little narrow at present. Can we
do something about usability?

Am I missing something?

-- Simon Riggs           www.2ndQuadrant.com



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Comments on Exclusion Constraints and related datatypes
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Proposal: access control jails (and introduction as aspiring GSoC student)