Re: Bug in triggers - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug in triggers
Date
Msg-id 8963.1267828323@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug in triggers  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Bug in triggers  (Chris Travers <chris@metatrontech.com>)
Re: Bug in triggers  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Mar 3, 2010 at 9:53 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> It does seem weird that assigning NEW to var changes the value; I'm
>> not sure why that happens.  Is that what you're asking about?

> Anyone else have an opinion on whether this is a bug?

It's arguably a bug, but since we lack consensus on whether NULL and
ROW(NULL,NULL,...) are the same thing, it's difficult to make a
bulletproof case either way.  In any case nothing is likely to get done
about it in the near term because it's wired into plpgsql's
implementation.  Changing from row to record representation of such
variables is possible but would probably have side effects, ie, it would
create new compatibility issues of unknown seriousness.  I'm not too
optimistic about the performance implications either.

I think it might be material for a TODO item, but I don't want to
consider any immediate fixes.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Bug in triggers
Next
From: Chris Travers
Date:
Subject: Re: Bug in triggers