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

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Дата
Msg-id CAM3SWZT++_O13t=yaLXnsA87vr3dgYXe7U09T5Mw_gbUxqvC3Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-bugs
On Tue, Dec 8, 2015 at 3:32 PM, Peter Geoghegan <pg@heroku.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Incorrect UPDATE trigger invocation in the UPDATE clause of an UPSERT statement.