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

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Stanislav Grozev <tacho(at)daemonz(dot)org>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Date: 2015-12-03 08:19:58
Message-ID: CAEZATCXxhKui4hCMXGyeWUeo-pTS7r4BwfzjkM7v0sOvLiAETA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 3 December 2015 at 07:30, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
> On Mon, Nov 30, 2015 at 8:43 PM, Stanislav Grozev wrote:
>> If we do an UPSERT instead, watch how OLD and NEW are the same (NEW):
>
> AFAIK, that's the expected behavior. AFTER UPDATE triggers firing for
> ON CONFLICT DO UPDATE will see the same NEW and OLD values. Comments
> from others?

That's not what I would expect. I would expect it to be consistent
with AFTER triggers firing after a plain UPDATE, and also with BEFORE
triggers for ON CONFLICT DO UPDATE.

Regards,
Dean

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message otheus uibk 2015-12-03 10:52:30 Possible bug: ALTER TABLE x DROP COLUMN y "column ... does not exist" then it does
Previous Message Stanislav Grozev 2015-12-03 07:33:28 Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.