Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Дата
Msg-id 1412028516.55942.YahooMailNeo@web122303.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Andres Freund <andres@2ndquadrant.com>)
Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> wrote:
> On 2014-09-29 14:57:45 -0700, Kevin Grittner wrote:

>> The initial implementation could restrict to these exact clauses
>> and require that the boolean-expression used equality-quals on all
>> columns of a unique index on only NOT NULL columns.
>
> That'll make it really hard to actually implement real MERGE.
>
> Because suddenly there's no way for the user to know whether he's
> written a ON condition that can implement UPSERT like properties
> (i.e. the *precise* column list of an index) or not.

Well, unless we abandon transactional semantics for other MERGE
statements, we should have a way that UPSERT logic continues to
work if you don't match a suitable index; it will just be slower --
potentially a lot slower, but that's what indexes are for.  I don't
think we need a separate statement type for the one we "do well",
because I don't think we should do the other one without proper
transactional semantics.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Следующее
От: Andres Freund
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}