Re: Move FOR PORTION OF checks out of analysis - Mailing list pgsql-hackers

From jian he
Subject Re: Move FOR PORTION OF checks out of analysis
Date
Msg-id CACJufxGq+Mpvuf1R+Ua5OrVfJgMcVemVNFUAuMN36J9gxQwk5Q@mail.gmail.com
Whole thread
Responses Re: Move FOR PORTION OF checks out of analysis
List pgsql-hackers
On Sat, May 16, 2026 at 5:17 AM Paul A Jungwirth
<pj@illuminatedcomputing.com> wrote:
>
> 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.
>

+ if (contain_volatile_functions(parse->forPortionOf->targetRange))
+ ereport(ERROR,
+ (errmsg("FOR PORTION OF bounds cannot contain volatile functions")))

missing errcode, we can change it to

+        if (contain_volatile_functions(parse->forPortionOf->targetRange))
+            ereport(ERROR,
+                    errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                    errmsg("FOR PORTION OF bounds cannot contain
volatile functions"));



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Why is the LSN reported for pg_logical_emit_message() different from other decoded operations?
Next
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition