Re: ON CONFLICT DO SELECT (take 3) - Mailing list pgsql-hackers

From Viktor Holmberg
Subject Re: ON CONFLICT DO SELECT (take 3)
Date
Msg-id 652db375-a27e-47c3-b55b-4eb9c9a8d819@Spark
Whole thread Raw
In response to Re: ON CONFLICT DO SELECT (take 3)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: ON CONFLICT DO SELECT (take 3)
List pgsql-hackers
On 11 Feb 2026 at 17:11 +0100, Dean Rasheed <dean.a.rasheed@gmail.com>, wrote:
On Wed, 11 Feb 2026 at 14:55, Viktor Holmberg <v@viktorh.net> wrote:

Looking more at this, I’m quite sure that the p_is_insert field can just be removed?
See 0002.

Ah, good idea. Well spotted!

This dates back to c1ca3a1, which removed a similar p_is_update field,
but noted that using p_is_insert wasn't particularly pretty.

Going back even further, it looks like p_is_insert and p_is_update
used to be much more widely used, but now we're down to just this one
place in transformAssignedExpr() that reads p_is_insert, and as you
say, it can deduce the same information from the exprKind passed to
it, which is much neater.

Barring objections, I'll push both those shortly.
Certainly no objections from me! Excited to get this in.

/Viktor

pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: Improving GUC prefix ownership for extensions
Next
From: Nathan Bossart
Date:
Subject: Re: Pasword expiration warning