Search Postgresql Archives

Re: After delete trigger problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

thanks for answers!

I tried to rename the function

ALTER TRIGGER td_y ON child RENAME TO "BTD_Y";

with no help.

Also according to the manual BEFORE DELETE trigger should launch before casading delete, so I changed the trigger

CREATE TRIGGER "BTD_Y" BEFORE DELETE ON chlid FOR EACH ROW EXECUTE PROCEDURE fn_td_y();

with no help. Any other ideas?

Regards,
Teemu Juntunen

----- Original Message ----- From: "Tom Lane" <tgl@xxxxxxxxxxxxx>
To: "Teemu Juntunen" <teemu.juntunen@xxxxxxxxxx>
Cc: "PostgreSQL" <pgsql-general@xxxxxxxxxxxxxx>
Sent: Friday, November 07, 2008 9:23 PM
Subject: Re:  After delete trigger problem


"Teemu Juntunen" <teemu.juntunen@xxxxxxxxxx> writes:
CREATE TRIGGER td_y AFTER DELETE ON chlid FOR EACH ROW EXECUTE PROCEDURE fn_td_y();

It seems that SELECT results to null, so the master has already deleted the row. Is this intended and how can I solve this?

Your trigger is firing after the RI triggers.  If you want it to fire
before, give it a name that is before them (in ASCII order).

regards, tom lane


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux