From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jay Parker <jbparker@ualr.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: access to new/old in dynamic sql for audit table
Date: Wed, 08 Jun 2005 12:27:26 -0400
Message-ID: <3960.1118248046@sss.pgh.pa.us> (raw)
In-Reply-To: <42A714A4.80602@ualr.edu>
References: <42A714A4.80602@ualr.edu>
Jay Parker <jbparker@ualr.edu> writes:
> I am revisiting the age-old audit table issue, and am curious to see
> whether I can get away with not writing custom trigger functions for
> every table being audited.
You can't do it nohow in plpgsql. I believe it's relatively simple in
pltcl or plperl, though, because those languages don't try to precompile
column references.
Or if you're feeling bold, you could write the trigger in C ;-).
There are some examples that do pretty similar stuff in contrib/spi/.
If performance is a big concern this would be a good plan anyway.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, jbparker@ualr.edu
Subject: Re: access to new/old in dynamic sql for audit table
In-Reply-To: <3960.1118248046@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox