Search Postgresql Archives

Re: Trigger Function question

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

 



Thanks for the example. I have a test trigger now that does that but my application needs all of the columns.

> On 07/10/2023 2:31 PM EDT Christophe Pettus <xof@xxxxxxxxxxxx> wrote:
> 
>  
> > On Jul 10, 2023, at 11:29, DAVID ROTH <adaptron@xxxxxxxxxxx> wrote:
> > 
> > I want to use a single trigger function to log multiple tables and the tables have different columns.  I can get the names of the columns from the catalog.  But I have not been able to figure out how to get NEW.x when x is not known until run time.
> 
> Unless you only want to log a subset of rows from each table, it's not required that you get the specific columns.  Here's an example of how to do a generic auditing trigger:
> 
> 	https://wiki.postgresql.org/wiki/Audit_trigger
> 
> If it's supported on your platform, you might also look at the pg_audit extension.





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux