Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...
Дата
Msg-id 3883B185.7484996E@tm.ee
обсуждение исходный текст
Ответ на Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Список pgsql-hackers
Jan Wieck wrote:
> 
>      With CREATE CONSTRAINT TRIGGER (which I added first so someone could
>      already work on pg_dump - what noone does up to now :-( ), you can
>      specify deferrability and initial deferred state for the trigger. And
>      it correctly sets up the PK<->FK tables relationships in pg_trigger,
>      so that DROPping one of them removes all the triggers using it from
>      the other one. Needless to say that dropping and recreating a PK
>      table looses all the references! But dropping and recreating the
>      referencing tables therefore doesn't put the PK table into an
>      unusable state.
> 

Oracle solves these kind of problems by having a CREATE OR REPLACE command, 
that keeps as much of related objects as possible if there is already an 
object by that name.

Does anyone know if it is ANSI SQL ?

--------------------------
Hannu


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] bugs@postgresql.org?
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: How to ignore system indexes