Re: audit information

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: KeithW(at)narrowpathinc(dot)com
Cc: PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: audit information
Date: 2005-04-26 15:31:57
Message-ID: 2336.1114529517@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Keith Worthington" <keithw(at)narrowpathinc(dot)com> writes:
> I have created the following function to create the necessary data for my
> audit trail. Unfortunately I do not know how I can test it without putting
> the whole modification in place. (This is a small part of a much bigger project.)

> Can anyone suggest how to test this functionality without implementing it as a
> trigger on a table?

You can't. But you could make a test table and install the function as
a trigger on that.

> Can this function be implemented as STABLE STRICT?

Nope. STRICTness is meaningless anyway for a trigger, since it has no
explicit arguments to be strict about. And triggers are always volatile
since the entire point is to have side-effects. In the current code I
am not sure whether it matters if you try to mark a trigger function
stable ... but if the system were actually to enforce the STABLE
restrictions against your function, you'd not like the result. Some day
it probably will enforce them...

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Keith Worthington 2005-04-26 20:41:05 Re: Poor-man's enumeration type
Previous Message Keith Worthington 2005-04-26 15:14:58 Re: audit information