pgsql: Fix assert failure in expand_grouping_sets

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix assert failure in expand_grouping_sets
Date: 2021-06-21 11:11:49
Message-ID: E1lvHqH-0007Pf-6R@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix assert failure in expand_grouping_sets

linitial_node() fails in assert enabled builds if the given pointer is
not of the specified type. Here the type is IntList. The code thought
it should be expecting List, but it was wrong.

In the existing tests which run this code the initial list element is
always NIL. Since linitial_node() allows NULL, we didn't trigger any
assert failures in the existing regression tests.

There is still some discussion as to whether we need a few more tests in
this area, but for now, since beta2 is looming, fix the bug first.

Bug: #17067
Discussion: https://postgr.es/m/17067-665d50fa321f79e0@postgresql.org
Reported-by: Yaoguang Chen

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8d29d45d9b3cab95a866efbcdd9138b3d76741b3

Modified Files
--------------
src/backend/parser/parse_agg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2021-06-21 12:29:12 pgsql: Use correct horizon when vacuuming catalog relations.
Previous Message Peter Eisentraut 2021-06-21 10:34:13 pgsql: Translation updates