Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
От | Peter Geoghegan |
---|---|
Тема | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
Дата | |
Msg-id | CAM3SWZS0uCh2-PeO81=X9btS_E2uezoLP4NY9nf9k1RdJvLgMw@mail.gmail.com обсуждение исходный текст |
Ответ на | INSERT ... ON CONFLICT {UPDATE | IGNORE} (Peter Geoghegan <pg@heroku.com>) |
Ответы |
Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
|
Список | pgsql-hackers |
On Wed, Aug 27, 2014 at 7:43 PM, Peter Geoghegan <pg@heroku.com> wrote: > There are some restrictions on what this auxiliary update may do, but > FWIW there are considerably fewer than those that the equivalent MySQL > or SQLite feature imposes on their users. I realized that I missed a few cases here. For one thing, the posted patch fails to arrange for the UPDATE post-parse-analysis tree representation to go through the rewriter stage (on the theory that user-defined rules shouldn't be able to separately affect the auxiliary UPDATE query tree), but rewriting is at least necessary so that rewriteTargetListIU() can expand a "SET val = DEFAULT" targetlist, as well as normalize the ordering of the UPDATE's tlist. Separately, the patch fails to defend against certain queries that ought to be disallowed, where a subselect is specified with a subquery expression in the auxiliary UPDATE's WHERE clause. These are garden-variety bugs that aren't likely to affect the kind of high-level design discussion that I'm looking for here. I'll post a fixed version in a few days time. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: