Re: Docs - Plpgsql trigger example auditing changes into

From: Mark Kirkwood <markir(at)coretech(dot)co(dot)nz>
To: David Fetter <david(at)fetter(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Docs - Plpgsql trigger example auditing changes into
Date: 2004-12-05 08:01:42
Message-ID: 41B2C066.20807@coretech.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

David Fetter wrote:

>It occurs to me that this might be a place to demo table inheritance
>too, to ease automating the creation, etc. of the auditing
>infrastructure :)
>
>
>
It certainly makes the creation of the audit table painless :

CREATE TABLE emp_audit(
operation char(1) NOT NULL,
stamp timestamp NOT NULL,
userid text NOT NULL
) INHERITS (emp);

However SELECT FROM emp will return rows from emp_audit as well! (unless
we always use FROM ONLY or set SQL_INHERITANCE=false). This seem likely
to confuse things!

regards

Mark

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Korea PostgreSQL Users' Group 2004-12-05 15:05:02 patch contrib/pgcrypto for win32
Previous Message Bruce Momjian 2004-12-05 01:53:34 Re: [PATCHES] Charset WIN1252