Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY
Date: 2022-08-04 15:13:22
Message-ID: 3503395.1659626002@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> Yeah, I tested in bc76f5ac4. Attached is a regression test I composed.
> I tested it locally and it can catch this bug before 1aa8dad41 and give
> the expected answer after 1aa8dad41.

Nice! I found we could simplify it even further: we don't seem to
need the generate_subscripts() to provoke the error in this query.
And it fails in v13-v14, too. Pushed.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-08-04 15:14:56 Re: BUG #17564: Planner bug in combination of generate_series(), unnest() and ORDER BY
Previous Message Japin Li 2022-08-04 14:59:07 Re: BUG #17570: Unrecognized node type for query with statistics on expressions