Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement. - Mailing list pgsql-bugs

From Andres Freund
Subject Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Date
Msg-id 20151210155136.GC2551@alap3.anarazel.de
Whole thread Raw
In response to Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.  (Stanislav Grozev <tacho@daemonz.org>)
List 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

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #13788: compile error in generic_msvc.h
Next
From: exru@mail.ru
Date:
Subject: BUG #13811: Default ordering colums