Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT... - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...
Date
Msg-id 3883B185.7484996E@tm.ee
Whole thread Raw
In response to Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
List 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 by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] bugs@postgresql.org?
Next
From: "Hiroshi Inoue"
Date:
Subject: How to ignore system indexes