Subject | RE: [firebird-support] Unique key exceptions & triggers |
---|---|
Author | Rick Debay |
Post date | 2013-01-10T19:39:54Z |
Thanks, I'm trying to follow Arthur Conan Doyle's advice "Once you
eliminate the impossible, whatever remains, no matter how improbable,
must be the truth" and turn improbabilities to impossibilities.
Rick DeBay
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Thomas
Steinmaurer
Sent: Thursday, January 10, 2013 2:03 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Unique key exceptions & triggers
This can be easily checked with the Trace API. The execution order of
the trace events are:
EXECUTE_STATEMENT_START (insert into)
EXECUTE_TRIGGER_START (before insert)
EXECUTE_TRIGGER_FINISH (before insert)
FAILED EXECUTE_STATEMENT_FINISH (insert into) ERROR AT jrd8_execute
Regards,
Thomas
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
eliminate the impossible, whatever remains, no matter how improbable,
must be the truth" and turn improbabilities to impossibilities.
Rick DeBay
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Thomas
Steinmaurer
Sent: Thursday, January 10, 2013 2:03 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Unique key exceptions & triggers
> If I insert duplicate rows, I assume the order of operations is:Correct.
>
> Before triggers
> Insert
> Exception
> After triggers <-- never executed
This can be easily checked with the Trace API. The execution order of
the trace events are:
EXECUTE_STATEMENT_START (insert into)
EXECUTE_TRIGGER_START (before insert)
EXECUTE_TRIGGER_FINISH (before insert)
FAILED EXECUTE_STATEMENT_FINISH (insert into) ERROR AT jrd8_execute
Regards,
Thomas
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links