Re: Re: Why is unique constraint needed for upsert? (treat atomicity as optional)
От
John R Pierce
Тема
Re: Re: Why is unique constraint needed for upsert? (treat
atomicity as optional)
Дата
Msg-id
53D040AC.8020106@hogranch.com
Ответ на
Список
Дерево обсуждения
Why is unique constraint needed for upsert? Seamus Abshere <seamus@abshere.net>
Re: Why is unique constraint needed for upsert? John R Pierce <pierce@hogranch.com>
Re: Why is unique constraint needed for upsert? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) Seamus Abshere <seamus@abshere.net>
Re: Why is unique constraint needed for upsert? (treat atomicity as
optional) David G Johnston <david.g.johnston@gmail.com>
Re: Why is unique constraint needed for upsert? (treat atomicity as optional) Tom Lane <tgl@sss.pgh.pa.us>
Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) John R Pierce <pierce@hogranch.com>
Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) Seamus Abshere <seamus@abshere.net>
Re: Why is unique constraint needed for upsert? (treat atomicity as
optional) David G Johnston <david.g.johnston@gmail.com>
Re: Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) Seamus Abshere <seamus@abshere.net>
Re: Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) John R Pierce <pierce@hogranch.com>
Re: Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) Seamus Abshere <seamus@abshere.net>
Re: Re: Why is unique constraint needed for upsert? (treat
atomicity as optional) John R Pierce <pierce@hogranch.com>
Re: Why is unique constraint needed for upsert? (treat atomicity as
optional) David G Johnston <david.g.johnston@gmail.com>
Re: Why is unique constraint needed for upsert? Igor Neyman <ineyman@perceptron.com>
On 7/23/2014 3:58 PM, Seamus Abshere wrote: > Right - if you had a situation where that might happen, you would use > a slightly more advanced version of the UPSERT command (and/or add a > unique index). a unique index wouldn't resolve the problem. without one, you'd end up with two records, with one, you'd end up with an error. naive programmers never seem to expect concurrency, its something that just happens. -- john r pierce 37N 122W somewhere on the middle of the left coast
В списке pgsql-general по дате отправления