Search Postgresql Archives

Re: Old values in statement triggers?

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

 



2010/10/21 Grzegorz JaÅkiewicz <gryzman@xxxxxxxxx>:
> OLD.column_name
> NEW.column_name ?

I believe OP is asking specifically about statement-level triggers. As
the docs <http://www.postgresql.org/docs/current/static/trigger-definition.html>
say:

| Statement-level triggers do not currently have any way to
| examine the individual row(s) modified by the statement.

What I've done is to have a row-level trigger that populates a
temporary table with "interesting" changes that need further
processing, and then a statement-level trigger which does bulk-updates
based on what's in that temporary table. This comes in quite handy
when bulk-loading data, e.g. with COPY.

Josh

-- 
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