On Sat, May 16, 2026 at 5:17 AM Paul A Jungwirth
<[email protected]> 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"));