Re: constraint trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Komaravolu, Satya" <satya(dot)komaravolu(at)gilbarco(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: constraint trigger
Date: 2009-04-03 17:44:06
Message-ID: 18638.1238780646@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Komaravolu, Satya" <satya(dot)komaravolu(at)gilbarco(dot)com> writes:
> I'm running into the following error when i create a CONSTRAINT
> TRIGGER.

> NOTICE: ignoring incomplete trigger group for constraint "<unnamed>"
> FOREIGN KEY cd_card(tender) REFERENCES cd_tender(id)
> DETAIL: Found referenced table's DELETE trigger.

That is not an "error".

> CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER DELETE ON "cd_tender" NOT
> DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
> "RI_FKey_noaction_del" ('<unnamed>', 'cd_card', 'cd_tender',
> 'UNSPECIFIED', 'tender', 'id');

This is one out of a group of three related triggers that ancient
Postgres versions used to use to implement foreign key constraints.
(Actually, modern versions still use related triggers, but they're
a bit better hidden now --- you shouldn't see them in pg_dump output,
for sure.)

The message is telling you that the system is waiting for the other two
matching trigger definitions so that it will have enough information to
create a regular FOREIGN KEY constraint.

If you are doing this as part of loading an old dump file, just ignore
the notice and keep going; everything should be fine. If you are doing
this manually, maybe you had better explain why.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gerd Koenig 2009-04-03 18:35:37 Re: high load on server
Previous Message Tom Lane 2009-04-03 17:25:05 Re: slow select in big table