pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org, <pgsql-hackers@postgresql.org>
Subject: Re: [SQL] Problem: Referential Integrity Constraints lost
Date: Wed, 6 Nov 2002 14:53:21 +0200 (EET)
Message-ID: <Pine.LNX.4.44.0211061447400.5940-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0211061427520.5797-100000@matrix.gatewaynet.com>

Also i must that these lost triggers implement the parent table
side of the constraint, e.g.

CREATE TABLE VslSections(
id serial NOT NULL UNIQUE PRIMARY KEY,
name varchar(20) NOT NULL UNIQUE);

CREATE TABLE MachClasses(
id serial NOT NULL UNIQUE PRIMARY KEY,
name varchar(20) NOT NULL UNIQUE,
vslsecid int4 NOT NULL,
FOREIGN KEY (vslsecid) REFERENCES VslSections (id));

Then the triggers created are :

1)
CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER INSERT OR UPDATE ON
"machclasses"  FROM "vslsections" NOT DEFERRABLE INITIALLY IMMEDIATE FOR
EACH ROW EXECUTE PROCEDURE "RI_FKey_check_ins" ('<unnamed>',
'machclasses', 'vslsections', 'UNSPECIFIED', 'vslsecid', 'id');
2)
CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER DELETE ON "vslsections"  FROM
"machclasses" NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE
PROCEDURE "RI_FKey_noaction_del" ('<unnamed>', 'machclasses',
'vslsections', 'UNSPECIFIED', 'vslsecid', 'id');
3)
CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER UPDATE ON "vslsections"  FROM
"machclasses" NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE
PROCEDURE "RI_FKey_noaction_upd" ('<unnamed>', 'machclasses',
'vslsections', 'UNSPECIFIED', 'vslsecid', 'id');

The *LOST* triggers are 2 and 3.

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr





view thread (8+ messages)  latest in thread

Message-ID: <Pine.LNX.4.44.0211061447400.5940-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0211061447400.5940-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0211061447400.5940-100000@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] Problem: Referential Integrity Constraints lost
  In-Reply-To: <Pine.LNX.4.44.0211061447400.5940-100000@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox