Thread: trigger postgresql 7.4
Hi, I have a question connected with postgres procedural langauge. Version of Postgres: "PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc" I have a table on which I have created many triggers on the same event BEFORE UPDATE. I have 3 these triggers. In each of this trigger I have a statement RETURN NEW or ''RAISE EXCEPTION". My question is: 1. In which order (first, second, third) each trigger is executed? I think that triggers are executed in order by oid or by name. Tell me please. 2. Is it possible that next trigger on the same event is not executed when the previous one has returned "RETURN NEW"? 3. The last question is, is there any debbuger to debugg triggers in plpgsql? This could be very usefull. Please help, Daniel
am Thu, dem 19.10.2006, um 2:49:23 -0700 mailte Daniel.Chmielewski@gmail.com folgendes: > Hi, > I have a question connected with postgres procedural langauge. Version > of Postgres: > > "PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc" Outdated. > > I have a table on which I have created many triggers on the same event > BEFORE UPDATE. > > I have 3 these triggers. In each of this trigger I have a statement > RETURN NEW or ''RAISE EXCEPTION". > > My question is: > 1. In which order (first, second, third) each trigger is executed? > I think that triggers are executed in order by oid or by name. Tell me > please. By name, alphabetically. > > 2. Is it possible that next trigger on the same event is not executed > when the previous one has returned "RETURN NEW"? IIRC no. > > 3. The last question is, is there any debbuger to debugg triggers in > plpgsql? This could be very usefull. You can throw RAISE NOTICE... Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
On 19 Oct 2006 02:49:23 -0700, Daniel.Chmielewski@gmail.com
You can try EnterpriseDB, to test/debug your triggers, and then port it back to your 7.xx version (assuming you do not have an option of moving forward to 8.x).
Refrence:
http://www.developers.net/enterprisedbshowcase/view/1347
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com
< Daniel.Chmielewski@gmail.com> wrote:
3. The last question is, is there any debbuger to debugg triggers in
plpgsql? This could be very usefull.
You can try EnterpriseDB, to test/debug your triggers, and then port it back to your 7.xx version (assuming you do not have an option of moving forward to 8.x).
Refrence:
http://www.developers.net/enterprisedbshowcase/view/1347
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com