From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, 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-08 23:42:38 |
Message-ID: | CAM3SWZT++_O13t=yaLXnsA87vr3dgYXe7U09T5Mw_gbUxqvC3Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Dec 8, 2015 at 3:32 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> We're on the same page. I just happen to think we might as well put
> the check beside the existing special case check for weird before
> triggers -- within ExecUpdate()'s HeapTupleSelfUpdated case. That
> avoids an extra HeapTupleSatisfiesUpdate() call for every UPSERT
> update.
It would also be nice to "Assert(!isOnConflict)" within the
HeapTupleUpdated case within ExecUpdate(), if only to document that
that's not expected or possible. Adding a new isOnConflict argument to
ExecUpdate() (so that it can potentially raise an error to deal with
this case) also makes this possible.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2015-12-09 05:37:13 | Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement. |
Previous Message | Peter Geoghegan | 2015-12-08 23:36:52 | Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement. |