Statement Triggers. Ideas & help. - Mailing list pgsql-hackers

From F J Cuberos
Subject Statement Triggers. Ideas & help.
Date
Msg-id 001101bee72a$63240420$67cf35c3@default
Whole thread Raw
List pgsql-hackers
I´m trying to implement Statement Triggers in postgreSQL. The basic idea is
check (in ExcutePlan) if there are statement before call first time to
ExecAppend, ExecDelete or ExecUpdate (or after the last call in case of
after statement).

But if I exec "Insert into tbtest values (22,'cadena');" then ExecutePlan is
call two times, and ExecX too. Why?
The execution trace is:Entering ExecutePlanCalling ExecAppendEntering ExecAppendEntering ExecutePlanCalling
ExecAppendEnteringExecAppend
 

Other Question: SQL3 says
" The execution of triggered actionsdepends on the cursosr mode of the
current SQ-transaction. If the cursor mode is set to cascade off, then the
execution of the <triggered SQL statement>s is effectively deferred until
enacted implicitly by execution of a <commit statement> or a <close
statement>. Otherwise, the <triggered SQl statement>s are effectively
executed ..."

How apply this to postgre?

Thanks everybody.


F.J.Cuberos



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: psql return code for NOTICE
Next
From: "F J Cuberos"
Date:
Subject: RE: [HACKERS] Statement Triggers. Ideas & help.