pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
More than 1 trigger of the same kind
3+ messages / 3 participants
[nested] [flat]

* More than 1 trigger of the same kind
@ 2002-11-09 03:35  Ludwig Lim <lud_nowhere_man@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ludwig Lim @ 2002-11-09 03:35 UTC (permalink / raw)
  To: pgsql-sql

Hi:

   Can I have more than 1 trigger of same kind on one
table? (i.e. 2 AFTER INSERT TRIGGER) on 1 table?

   I'm planning to split up a large trigger function
(about 200 lines) into 2 seperate triggers. Since
PL/PGSQL functions cannot accepts OPAQUE as arguments,
I have to create 2 triggers instead of just creating 2
functions and having the trigger function calling
another function passing the record NEW and OLD.

   Does having more than 1 trigger of the same kind
produces some side effect? I mean is the order of the
trigger firing is always the same?

Thank you in advance,
ludwig.
  


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: More than 1 trigger of the same kind
@ 2002-11-09 03:49  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Ludwig Lim <lud_nowhere_man@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Stephan Szabo @ 2002-11-09 03:49 UTC (permalink / raw)
  To: Ludwig Lim <lud_nowhere_man@yahoo.com>; +Cc: pgsql-sql

On Fri, 8 Nov 2002, Ludwig Lim wrote:

> Hi:
>
>    Can I have more than 1 trigger of same kind on one
> table? (i.e. 2 AFTER INSERT TRIGGER) on 1 table?

Yes.

>    Does having more than 1 trigger of the same kind
> produces some side effect? I mean is the order of the
> trigger firing is always the same?

IIRC the triggers are fired in name order.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: More than 1 trigger of the same kind
@ 2002-11-09 04:33  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2002-11-09 04:33 UTC (permalink / raw)
  To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: Ludwig Lim <lud_nowhere_man@yahoo.com>; pgsql-sql

Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
>> Does having more than 1 trigger of the same kind
>> produces some side effect? I mean is the order of the
>> trigger firing is always the same?

> IIRC the triggers are fired in name order.

That's true as of 7.3; I do not think prior versions promised anything
about firing order.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-11-09 04:33 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-09 03:35 More than 1 trigger of the same kind Ludwig Lim <lud_nowhere_man@yahoo.com>
2002-11-09 03:49 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-11-09 04:33   ` Tom Lane <tgl@sss.pgh.pa.us>

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