Re: UPSERT wiki page, and SQL MERGE syntax

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: UPSERT wiki page, and SQL MERGE syntax
Дата
Msg-id CAM3SWZQvVbXPAV6KFRmimBtZOusQZiohpWKQEEZ-Uakv5S-ZHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: UPSERT wiki page, and SQL MERGE syntax  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: UPSERT wiki page, and SQL MERGE syntax
Re: UPSERT wiki page, and SQL MERGE syntax
Список pgsql-hackers
On Fri, Oct 10, 2014 at 11:30 AM, Kevin Grittner <kgrittn@ymail.com> wrote:
> That seems a lot cleaner than the proposal on the Wiki page.  If we
> go that route, it makes sense to fire the BEFORE INSERT triggers
> before attempting the insert and then fire BEFORE UPDATE triggers
> before attempting the UPDATE.  If either succeeds, I think we
> should fire the corresponding AFTER triggers.  We already allow a
> BEFORE triggers to run and then omit the triggering operation
> without an error, so I don't see that as a problem.  This makes a
> lot more sense to me than attempting to add a new UPSERT trigger
> type.

You realize that that's exactly what my patch does, right?

AFAICT the only confusion that my patch has is with statement-level
triggers, as discussed on the Wiki page. I think that the row-level
trigger behavior is fine; a lot more thought has gone into it.

-- 
Peter Geoghegan



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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: UPSERT wiki page, and SQL MERGE syntax
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: UPSERT wiki page, and SQL MERGE syntax