Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression"
Дата
Msg-id 871sd8sqxf.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATEitem must be a sub-SELECT or ROW() expression"  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
>>>>> "Justin" == Justin Pryzby <pryzby@telsasoft.com> writes:

 >> It then apparently went unnoticed until after the release of pg 10,
 >> at which point it got retroactively documented (in the release notes
 >> and nowhere else), in response to a brief discussion of a user
 >> complaint that happened on -general and not -hackers (or even
 >> -bugs).

 Justin> Actually I noticed and pointed out during beta;
 Justin>
https://www.postgresql.org/message-id/flat/20170719174507.GA19616%40telsasoft.com#20170719174507.GA19616@telsasoft.com

Interesting, I missed that when searching. So that tells us:

1. Breaking SET (col) = (val) wasn't actually intended or noticed in the
   original patch;

2. The break was then defended based on an incorrect reading of the spec
   (as I pointed out already on -bugs, the syntax _is_ legal in the spec
   with only one column, for just the same reasons that VALUES (1) isn't
   required to be VALUES row(1); the spec adds the ROW( ) construct
   itself in one of the syntax rules, in a way that's easy to overlook)

-- 
Andrew (irc:RhodiumToad)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: ntile() throws ERROR when hashagg is false
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Few cosmetic suggestions for commit 16828d5c (Fast Alter TableAdd Column...)