"David G. Johnston" writes:
> On Sat, Oct 7, 2023 at 11:11 AM Kirk Parker wrote:
>> INSERT INTO emp_audit SELECT 'D', now(), user, OLD.*; -- <= ARGUMENT IN
>> QUESTION
>> The emp_audit table has a column named 'userid', which in actual usage
>> (next-to-last line quoted) is populated by 'user' w
On Sat, Oct 7, 2023 at 11:11 AM Kirk Parker wrote:
>
> INSERT INTO emp_audit SELECT 'D', now(), user, OLD.*; -- <=
> ARGUMENT IN QUESTION
> The emp_audit table has a column named 'userid', which in actual usage
> (next-to-last line quoted) is populated by 'user' which seems undefined
The PL/pgSQL page on triggers (
https://www.postgresql.org/docs/16/plpgsql-trigger.html ) contains the
following example (I'm excerpting only the essential parts here):
Example 43.4. A PL/pgSQL Trigger Function for Auditing
...
CREATE TABLE emp_audit(
operation char(1) NOT NULL