pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash
Date: Fri, 24 Feb 2023 14:53:57 -0800
Message-ID: <20230224225357.2orpiokrfpjllfm4@awork3.anarazel.de> (raw)
In-Reply-To: <1060251.1677276763@sss.pgh.pa.us>
References: <20230222192350.wviaslfpo3w2ja3l@awork3.anarazel.de>
	<290812.1677101054@sss.pgh.pa.us>
	<586533.1677178414@sss.pgh.pa.us>
	<20230223210012.4qigvo6sryn2syu5@awork3.anarazel.de>
	<718944.1677189963@sss.pgh.pa.us>
	<20230223233636.zkt4tqzsc4b6ekwn@awork3.anarazel.de>
	<20230224015417.75yimxbksejpffh3@awork3.anarazel.de>
	<851179.1677259566@sss.pgh.pa.us>
	<20230224174412.xk3y364t6a2udp5t@awork3.anarazel.de>
	<1060251.1677276763@sss.pgh.pa.us>

Hi,

On 2023-02-24 17:12:43 -0500, Tom Lane wrote:
> OK, so this worked out quite well ... it's only about 50 net new lines
> of code, and there's no data structure changes outside the contents of
> compiled expressions, so no reason to fear ABI problems.

Nice.


> I did the renaming you had comments suggesting, but perhaps you want
> to bikeshed those names?

Not really. I guess it'd be mildly nicer to have Expr somewhere in the name,
but whatever.


> @@ -677,20 +680,8 @@ ExecBuildUpdateProjection(List *targetList,
>  	}
>  
>  	/*
> -	 * If we're evaluating the tlist, must evaluate any resjunk columns too.
> -	 * (This matters for things like MULTIEXPR_SUBLINK SubPlans.)
> +	 * We don't bother evaluating any tlist entries that are marked resjunk.
>  	 */
> -	if (evalTargetList)
> -	{
> -		for_each_cell(lc, targetList, lc)
> -		{
> -			TargetEntry *tle = lfirst_node(TargetEntry, lc);
> -
> -			Assert(tle->resjunk);
> -			ExecInitExprRec(tle->expr, state,
> -							&state->resvalue, &state->resnull);
> -		}
> -	}
>  
>  	/*
>  	 * Now generate code to copy over any old columns that were not assigned

The "don't bother" comment looks a bit lonely now :)

Greetings,

Andres Freund





view thread (34+ messages)  latest in thread

Message-ID: <20230224225357.2orpiokrfpjllfm4@awork3.anarazel.de>
Permalink:  ../20230224225357.2orpiokrfpjllfm4@awork3.anarazel.de/
Also on:    postgresql.org/message-id/20230224225357.2orpiokrfpjllfm4@awork3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, michael@paquier.xyz, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash
  In-Reply-To: <20230224225357.2orpiokrfpjllfm4@awork3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox