Re: Move FOR PORTION OF checks out of analysis

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Move FOR PORTION OF checks out of analysis
Date: 2026-06-24 09:53:58
Message-ID: 7b8efe9a-6281-4b52-8c4a-790fd96d377c@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11.06.26 23:37, Paul A Jungwirth wrote:
> On Tue, Jun 9, 2026 at 1:11 AM jian he <jian(dot)universality(at)gmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-06-24 10:24:49 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Previous Message shveta malik 2026-06-24 09:51:35 Re: Support EXCEPT for ALL SEQUENCES publications