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

From Peter Eisentraut
Subject Re: Move FOR PORTION OF checks out of analysis
Date
Msg-id 7b8efe9a-6281-4b52-8c4a-790fd96d377c@eisentraut.org
Whole thread
In response to Re: Move FOR PORTION OF checks out of analysis  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Responses Re: Move FOR PORTION OF checks out of analysis
List pgsql-hackers
On 11.06.26 23:37, Paul A Jungwirth wrote:
> On Tue, Jun 9, 2026 at 1:11 AM jian he <jian.universality@gmail.com> wrote:
>>
>> 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"));
> 
> Thanks for the note! Here is v9 with that change.

I have checked the patch v9 0002 "Move FOR PORTION OF volatile check 
into planner".  Functionality-wise, this seems correct.

Could you explain why you used EXPRKIND_TARGET?  Maybe there is a good 
reason, but otherwise it seems kind of arbitrary.

The new ereport call in planner.c has some funny parentheses: You have 
parentheses around errmsg, but not around errcode.  This is probably 
because of the way this was copy and pasted from its previous location.




pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Support EXCEPT for ALL SEQUENCES publications
Next
From: Fujii Masao
Date:
Subject: Re: Fix publisher-side sequence permission reporting