Move FOR PORTION OF checks out of analysis
Paul A Jungwirth <pj@illuminatedcomputing.com>
From: Paul A Jungwirth <pj@illuminatedcomputing.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: jian he <jian.universality@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-05-15T21:16:57Z
Lists: pgsql-hackers
Attachments
- v8-0001-Reject-child-partition-FDWs-in-FOR-PORTION-OF.patch (text/x-patch)
- v8-0002-Move-FOR-PORTION-OF-volatile-check-into-planner.patch (text/x-patch)
Starting a dedicated thread for this, based on [1]. To recap:
- FOR PORTION OF needs to reject FDWs in the planner/executor, not in
analysis, first to guarantee the status hasn't changed but also
because we need to check child partitions as well.
- We need to postpone checking for volatile functions too.
The first part is done by jian he's patch from that thread (with some
test revisions).
The second part is done by the second patch here.
There is no commitfest entry yet, so I'll make one from this thread.
[1] https://www.postgresql.org/message-id/626986.1776785090@sss.pgh.pa.us
Yours,
--
Paul ~{:-)
pj@illuminatedcomputing.com