Re: plan shape work
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Guo <guofenglinux@gmail.com>,
Alexandra Wang <alexandra.wang.oss@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
"bruce@momjian.us" <bruce@momjian.us>, lepihov@gmail.com
Date: 2025-09-09T19:43:12Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Assign each subquery a unique name prior to planning it.
- 8c49a484e8eb 19 (unreleased) landed
-
Keep track of what RTIs a Result node is scanning.
- f2bae51dfd5b 19 (unreleased) landed
On Tue, Sep 9, 2025 at 12:00 PM Robert Haas <robertmhaas@gmail.com> wrote: > On Tue, Sep 9, 2025 at 11:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > I think what would make a ton more sense is to add > > an enum field to Result that explicitly identifies why it's there. > > We've got at least "apply one-time filter to subplan", "apply per-row > > gating filter to subplan", "represent a relation proven empty", and > > "place-hold for a MinMaxAgg InitPlan". > > Thanks, I'll look into this. Just a random thought, but another idea that crossed my mind here at one point was to actually split the Result node up into Result nodes with subplans and Result nodes without subplans. We could call the version with a subplan "Project" and the version without a subplan "Result", for example. This seems a little silly because both variants would need to be able to handle resconstantqual, or alternatively we'd have to be OK with getting "Project" on top of "Result" in some cases where a single "Result" node currently does both jobs. On the other hand, only Project needs a subplan, and only Result needs relids. -- Robert Haas EDB: http://www.enterprisedb.com