Re: Returning NEW in an on-delete trigger

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Nolan <htfoot(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Returning NEW in an on-delete trigger
Date: 2008-09-18 20:59:07
Message-ID: 1221771547.6194.257.camel@dell.linuxdev.us.dell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2008-09-18 at 15:04 -0400, Tom Lane wrote:
> This does seem like a bit of a gotcha for someone who writes RETURN NEW
> instead of RETURN OLD or vice versa, but I'm not sure how much we can do
> about that. Lots of people like to write triggers that fire on multiple
> event types, so we couldn't throw a syntax error for such a reference.
> A runtime error for a use of the variable might be possible, but a quick
> look at the code doesn't make it look easy.
>

Here's a doc patch that may clear up some of the confusion.

Regards,
Jeff Davis

Attachment Content-Type Size
doc.diff text/x-patch 1.2 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2008-09-18 21:01:02 Re: 8.3.3 stability ?
Previous Message Daniel Futerman 2008-09-18 19:47:21 Re: Running initdb while logged in as Administrator user (Windows)