Re: Grouping Sets: Fix unrecognized node type bug

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Grouping Sets: Fix unrecognized node type bug
Дата
Msg-id 87lheehend.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Grouping Sets: Fix unrecognized node type bug  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Grouping Sets: Fix unrecognized node type bug  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Re: Grouping Sets: Fix unrecognized node type bug  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
>>>>> "Kyotaro" == Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:

 Kyotaro> Hello, this looks to be a kind of thinko. The attached patch
 Kyotaro> fixes it.

No, that's still wrong. Just knowing that there is a List is not enough
to tell whether to concat it or append it.

Jeevan's original patch tries to get around this by making the RowExpr
case wrap another List around its result (which is then removed by the
concat), but this is the wrong approach too because it breaks nested
RowExprs (which isn't valid syntax in the spec, because the spec allows
only column references in GROUP BY, not arbitrary expressions, but which
we have no reason not to support).

Attached is the current version of my fix (with Jeevan's regression
tests plus one of mine).

--
Andrew (irc:RhodiumToad)


Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: 9.6 First Commitfest Begins
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench - allow backslash-continuations in custom scripts