Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Stanislav Grozev <tacho(at)daemonz(dot)org>, Peter Geoghegan <pg(at)heroku(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Date: 2015-12-10 15:51:36
Message-ID: 20151210155136.GC2551@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2015-11-30 11:43:12 +0000, Stanislav Grozev wrote:
> I'd like to report a bug in the UPDATE trigger invocation when using the
> new INSERT ON CONFLICT UPDATE (UPSERT) functionality.
>
> In short, if an UPDATE trigger is invoked by the ON CONFLICT DO UPDATE
> clause of an UPSERT statement - it receives the new values in both the OLD
> and NEW variables. Whereas if invoked by a normal UPDATE statement - it
> correctly gets the respective values in OLD and NEW.

I've pushed a fix for this. Thanks for the report!

- Andres

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Paul Moore 2015-12-10 17:27:08 Re: BUG #13788: compile error in generic_msvc.h
Previous Message Alexander Ashurkov 2015-12-10 15:14:55 Re: BUG #13809: Reassign owned throws error