PATCH for Statement Triggers Support

From: "F(dot)J(dot) Cuberos" <fjcuberos(at)infomail(dot)lacaixa(dot)es>
To: <pgsql-patches(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: PATCH for Statement Triggers Support
Date: 1999-08-25 11:28:22
Message-ID: 003b01beeeec$f4490030$0100a8c0@spinone
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I attach the patch for Statement Triggers (StmtTrig) in postgreSQL.
Statement Triggers are executed only once for the command use in the
definition not influenced by the number of tuples affected. With this path
is valid the sentence

"CREATE TRIGGER disp1 BEFORE INSERT ON tbtest FOR EACH STATEMENT EXECUTE
PROCEDURE FUNTEST();"

Thanks.

Notes of use:

Keep in mind that when creating a StmtTrig the functions executed get the
tuples (NEW/OLD if PL, tg_trigtuple and tg_newtuple in C) set to NULL.

If there are statement and row triggers defined for the same table and the
same event:
a) if the event it´s before then it´s executed statement prior to any row
trigger
b) if the event it´s afte then are executed all row prior to statement
trigger

TODO triggers list:
->Include order to triggers following the recomendations of SQL3.
->Modify PL/SQL to access NEW/OLD table.

Attachment Content-Type Size
st_trig.diff.gz application/x-gzip 2.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-08-25 13:46:10 Re: [HACKERS] vacuum process size
Previous Message Ansley, Michael 1999-08-25 07:55:15 RE: [HACKERS] Lex and things...