Thread: audit trigger (update)

audit trigger (update)

From
Wim Bertels
Date:
Hallo,

on
http://wiki.postgresql.org/wiki/Audit_trigger

the 
RETURN NULL 
in the delete part of the trigger
should be
RETURN OLD

about the other RETURN NULL,
one can discuss.

mvg,
Wim Bertels




Re: audit trigger (update)

From
Robert Haas
Date:
On Wed, Jun 8, 2011 at 11:52 AM, Wim Bertels <wim.bertels@khleuven.be> wrote:
> Hallo,
>
> on
> http://wiki.postgresql.org/wiki/Audit_trigger
>
> the
> RETURN NULL
> in the delete part of the trigger
> should be
> RETURN OLD

I don't think it matters, does it?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: audit trigger (update)

From
Wim Bertels
Date:
Robert Haas schreef op ma 13-06-2011 om 01:03 [-0400]:
> On Wed, Jun 8, 2011 at 11:52 AM, Wim Bertels <wim.bertels@khleuven.be> wrote:
> > Hallo,
> >
> > on
> > http://wiki.postgresql.org/wiki/Audit_trigger
> >
> > the
> > RETURN NULL
> > in the delete part of the trigger
> > should be
> > RETURN OLD
> 
> I don't think it matters, does it?

yes it does,
otherwise this audit_trigger cancels delete statements
(as it is processed before in this example)

mvg,
Wim

>