From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Jan Wieck <wieck(at)debis(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT... |
Date: | 2000-01-18 00:19:17 |
Message-ID: | 3883B185.7484996E@tm.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2000-01-18 01:02:31 | How to ignore system indexes |
Previous Message | Mike Mascari | 2000-01-18 00:17:05 | Is pg_dump still broken? |