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

From: Stanislav Grozev <tacho(at)daemonz(dot)org>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: 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 07:33:28
Message-ID: CAA78GVqaemufZC8FFcCxKbjT0zSo46m+MyczUhXRmy6cmDaUpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I fail to see the logic and why would it be useful for an UPDATE trigger to
get the same values. Especially when it would differ from a normal AFTER
UPDATE firing for an UPDATE query?

On Thu, Dec 3, 2015 at 9:30 AM 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?
> --
> Michael
>
--

-S

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2015-12-03 08:19:58 Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Previous Message Michael Paquier 2015-12-03 07:30:29 Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.