Re: Move FOR PORTION OF checks out of analysis

From: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, 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 16:39:33
Message-ID: CA+renyXPgU4VMsc+d9OddPR-NGYsSdntXdEZELAzpp6t7xiA9A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 24, 2026 at 2:54 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> 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.

This expression is used in the target list to set the application-time
column. We intersect the old value with the FOR PORTION OF bounds.

> 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.

Here are new patches with the parens cleaned up.

Yours,

--
Paul ~{:-)
pj(at)illuminatedcomputing(dot)com

Attachment Content-Type Size
v10-0001-Reject-child-partition-FDWs-in-FOR-PORTION-OF.patch text/x-patch 10.4 KB
v10-0002-Move-FOR-PORTION-OF-volatile-check-into-planner.patch text/x-patch 2.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-06-24 16:44:52 Re: [PATCH] Preserve replication origin OIDs in pg_upgrade
Previous Message Paul A Jungwirth 2026-06-24 16:02:21 Re: [PATCH] Fix null pointer dereference in PG19