Re: Wrong results with grouping sets

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Wrong results with grouping sets
Дата
Msg-id CAMbWs48E_bqOnFSw1Nm+03g-cA_Runt1J0onQZQnD-yA+6-NDQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Wrong results with grouping sets  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: Wrong results with grouping sets
Список pgsql-hackers

On Fri, May 17, 2024 at 5:41 PM Richard Guo <guofenglinux@gmail.com> wrote:
I've spent some more time on this patch, and now it passes all the
regression tests.  But I had to hack explain.c and ruleutils.c to make
the varprefix stuff work as it did before, which is not great.

I've realized that I made a mistake in the v4 patch: If there are join
alias vars in the targetlist and HAVING clause, we should first flatten
them before replacing the grouped variables involved there with
grouping-RTE Vars.  To fix this issue, I decide to merge the newly added
function substitute_group_exprs into check_ungrouped_columns by changing
check_ungrouped_columns to also perform the replacement, which is Tom's
initial suggestion I think.

Now it seems that 'check_ungrouped_columns' is no longer an appropriate
name for the function.  So I rename it to 'substitute_grouped_columns'.
But I'm open to other names if there are any suggestions.

I've also worked on the comments.

Thanks
Richard
Вложения

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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: State of pg_createsubscriber
Следующее
От: Sandeep Thakkar
Дата:
Сообщение: Re: HEAD build error on Fedora 39