Search Postgresql Archives

How to fire triggers just on "top" level DML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We've been running for about ten years on a framework which fires
triggers similar to database triggers in a Java tier close to the
database, and we're now trying to convert these to actual PostgreSQL
database triggers.  Our biggest hitch at the moment is that we
defined a class of triggers we called "top" triggers, which only
fire from DML submitted by the application, not from DML issued by
other triggers.
 
One significant use of this is to block direct modification of
summary data (either selected columns or entire tables) which are
supposed to be trigger maintained.  It's not immediately obvious how
to accomplish this within PostgreSQL, although I'm probably missing
something.  We're not tied to any particular methodology -- a
TG_DEPTH variable, if it existed, would do fine, for example.
 
Any suggestions?
 
-Kevin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux