Re: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS
Дата
Msg-id 87tuwxrnzm.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS  (Andy Fan <zhihui.fan1213@gmail.com>)
Список pgsql-bugs
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> As a stopgap measure, I think what we have to do is teach
 Tom> check_output_expressions that subquery output columns are unsafe
 Tom> to reference if they are not listed in all grouping sets (do I
 Tom> have that condition right?).

Unless I'm missing something, it should be safe to reference output
columns that are not mentioned in any grouping set, or which are
mentioned in all grouping sets (after all expansions); but unsafe to
reference columns mentioned in some grouping sets but not others (since
these will be forced to null in the output for the sets in which they
don't appear).

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS
Следующее
От: Andy Fan
Дата:
Сообщение: Re: BUG #16585: Wrong filtering on a COALESCE field after using GROUPING SETS