Re: INSERT ... ON CONFLICT syntax issues
От
Geoff Winkless
Тема
Re: INSERT ... ON CONFLICT syntax issues
Дата
Msg-id
CAEzk6fcevLR82Sdr8Cd0Tp9XkLbzKSGyNYng7SM+JaT10pWhjw@mail.gmail.com
Ответ на
Re: INSERT ... ON CONFLICT syntax issues (Stephen Frost)
Список
Дерево обсуждения
INSERT ... ON CONFLICT syntax issues Andres Freund <andres@anarazel.de>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
Re: INSERT ... ON CONFLICT syntax issues Andres Freund <andres@anarazel.de>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
Re: INSERT ... ON CONFLICT syntax issues Andres Freund <andres@anarazel.de>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
Re: INSERT ... ON CONFLICT syntax issues Peter Eisentraut <peter_e@gmx.net>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
Re: INSERT ... ON CONFLICT syntax issues Simon Riggs <simon@2ndQuadrant.com>
Re: INSERT ... ON CONFLICT syntax issues Peter Geoghegan <pg@heroku.com>
+1, NEW/OLD seem pretty natural and I'm not worried about what they look
like in rules, and their usage in triggers matches up with what they'd
mean here, I'd think.
Since I've stuck my head above the parapet once I figured I'd give m
y 2p's worth: IMHO
NEW/OLD doesn't fit at all. In triggers you're applying it to something that (without the trigger) would be the new or old version of a matching row
, so it's completely intuitive
; in this instance without the ON CONFLICT there would never be a "
new"
, because it would be a
failure
.
MySQL uses VALUES(columnname) to reference the intended INSERT value (what you might term "NEW") and the target name to reference "OLD". I understand that people might think the bracketed syntax isn't very pleasant because that looks like a function, but it seems more reasonable than NEW (can we use VALUES.columname?); finally I don't see why we need an "OLD" (or TARGET) at all - am I missing the point?
Geoff
В списке pgsql-hackers по дате отправления