Richard Guo writes:
> Yeah, it's not the fault of the plan cache. I noticed this because in
> check_ungrouped_columns, both Const and Param are treated as always
> acceptable. However, in setrefs.c these two expression types are
> handled differently: Const is never matched to the lower tlist, w
On Thu, Aug 1, 2024 at 10:34 PM Tom Lane wrote:
> Richard Guo writes:
> > While working on the grouping sets patches for queries with GROUP BY
> > items that are constants, I noticed $subject on master. As an
> > example, consider
>
> This particular example seems like it's just an illustration
Richard Guo writes:
> While working on the grouping sets patches for queries with GROUP BY
> items that are constants, I noticed $subject on master. As an
> example, consider
This particular example seems like it's just an illustration of
our known bugs with grouping sets using non-Var columns.
While working on the grouping sets patches for queries with GROUP BY
items that are constants, I noticed $subject on master. As an
example, consider
prepare q1(int) as
select $1 as c1, $1 as c2 from generate_series(1,2) t group by rollup(c1);
set plan_cache_mode to force_custom_plan;
execute q1(