Re: BUG #14343: UPSERT (ON CONFLICT) doesn't check ON CONFLICT constraint first
От | Peter Geoghegan |
---|---|
Тема | Re: BUG #14343: UPSERT (ON CONFLICT) doesn't check ON CONFLICT constraint first |
Дата | |
Msg-id | CAM3SWZTycxbGykykgiKSgREVVGDYdmrWmWpjfMiniiqA30ryaA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #14343: UPSERT (ON CONFLICT) doesn't check ON CONFLICT constraint first (Reyes Ponce <reyes.r.ponce@gmail.com>) |
Ответы |
Re: BUG #14343: UPSERT (ON CONFLICT) doesn't check ON CONFLICT
constraint first
|
Список | pgsql-bugs |
On Fri, Sep 30, 2016 at 8:19 PM, Reyes Ponce <reyes.r.ponce@gmail.com> wrote: > Any chance you guys will do a > > UPDATE ... ON MISSING... DO INSERT... > > version as I expect in that case it would be implemented closer to the > functionality you get implementing upsert with a CTE (and how upsert in > most NoSql DB works (i.e. doesn't impose more restrictions than update > in the update case)) which would cover far more use cases than the > current design of INSERT... ON CONFLICT... DO UPDATE...? I don't think that that makes sense. If you know ahead of time that the INSERT path will definitely throw an error, you're either relying on that path never being taken, in which case you should just use a plain UPDATE, or you have a bug in your application code, in which case you should be glad to have it surfaced sooner rather than later. -- Peter Geoghegan
В списке pgsql-bugs по дате отправления: