pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix assert failure in expand_grouping_sets
Date: Mon, 21 Jun 2021 11:11:49 +0000
Message-ID: <E1lvHqH-0007Pf-6R@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1lvHqH-0007Pf-6R@gemulon.postgresql.org>
Permalink:  ../E1lvHqH-0007Pf-6R@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lvHqH-0007Pf-6R@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Fix assert failure in expand_grouping_sets
  In-Reply-To: <E1lvHqH-0007Pf-6R@gemulon.postgresql.org>
  References: <E1lvHqH-0007Pf-6R@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox