Re: Fwd: pg18 bug? SELECT query doesn't work

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Eric Ridge <eebbrr@gmail.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-01-16T03:27:36Z
Lists: pgsql-hackers, pgsql-general
On Fri, Jan 9, 2026 at 6:52 PM Richard Guo <guofenglinux@gmail.com> wrote:
> I've worked on the comment a bit more in the attached patch, which
> also includes my previously proposed code changes and some test cases.
>
> I think this patch is suitable for fixing the current bug in the back
> branches.  We can use a separate patch for the more ambitious goal of
> moving the push-down of subquery's restriction clauses into
> subquery_planner().

I plan to push and backpatch this patch early next week, barring any
objections.

- Richard



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix unsafe pushdown of quals referencing grouping Vars

  2. Introduce an RTE for the grouping step