Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
От | Bruce Momjian |
---|---|
Тема | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
Дата | |
Msg-id | 20141002201024.GA32531@momjian.us обсуждение исходный текст |
Ответ на | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} (Josh Berkus <josh@agliodbs.com>) |
Ответы |
Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
|
Список | pgsql-hackers |
On Tue, Sep 30, 2014 at 02:57:43PM -0700, Josh Berkus wrote: > I don't know that that is the *expectation*. However, I personally > would find it *acceptable* if it meant that we could get efficient merge > semantics on other aspects of the syntax, since my primary use for MERGE > is bulk loading. > > Regardless, I don't think there's any theoretical way to support UPSERT > without a unique constraint. Therefore eventual support of this would > require a full table lock. Therefore having it use the same command as > UPSERT with a unique constraint is a bit of a booby trap for users. > This is a lot like the "ADD COLUMN with a default rewrites the whole > table" booby trap which hundreds of our users complain about every > month. We don't want to add more such unexpected consequences for users. I think if we use the MERGE command for this feature we would need to use a non-standard keyword to specify that we want OLTP/UPSERT functionality. That would allow us to mostly use the MERGE standard syntax without having surprises about non-standard behavior. I am thinking of how CONCURRENTLY changes the behavior of some commands. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-hackers по дате отправления: