Re: [SQL] Problem: Referential Integrity Constraints lost

Поиск
Список
Период
Сортировка
Искать
От
Achilleus Mantzios
Тема
Re: [SQL] Problem: Referential Integrity Constraints lost
Дата
Msg-id
Pine.LNX.4.44.0211061447400.5940-100000@matrix.gatewaynet.com
Ответ на
Список
Дерево обсуждения
Problem: Referential Integrity Constraints lost Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: [SQL] Problem: Referential Integrity Constraints lost Achilleus Mantzios <achill@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 "" AFTER INSERT OR UPDATE ON
"machclasses"  FROM "vslsections" NOT DEFERRABLE INITIALLY IMMEDIATE FOR
EACH ROW EXECUTE PROCEDURE "RI_FKey_check_ins" ('',
'machclasses', 'vslsections', 'UNSPECIFIED', 'vslsecid', 'id');
2)
CREATE CONSTRAINT TRIGGER "" AFTER DELETE ON "vslsections"  FROM
"machclasses" NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE
PROCEDURE "RI_FKey_noaction_del" ('', 'machclasses',
'vslsections', 'UNSPECIFIED', 'vslsecid', 'id');
3)
CREATE CONSTRAINT TRIGGER "" AFTER UPDATE ON "vslsections"  FROM
"machclasses" NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE
PROCEDURE "RI_FKey_noaction_upd" ('', '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


В списке pgsql-hackers по дате отправления
От: Achilleus Mantzios
Дата:
От: Billy G. Allie
Дата:
FAQ