pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18722: Processing arrays with plpgsql raises errors
Date: Mon, 25 Nov 2024 14:16:11 -0500
Message-ID: <1440980.1732562171@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCUvXyCVbXMN8Z3GXn_xooNL+=B4e9G0CADceCoHyu4t-g@mail.gmail.com>
References: <18722-fd9e645448cc78b4@postgresql.org>
	<940942.1732412520@sss.pgh.pa.us>
	<1211277.1732488552@sss.pgh.pa.us>
	<CAEZATCWKt=XKP12qZhqBX4JaVSatmFwYFnoGYEDDqCbpe-HrEA@mail.gmail.com>
	<1341819.1732547251@sss.pgh.pa.us>
	<CAEZATCUvXyCVbXMN8Z3GXn_xooNL+=B4e9G0CADceCoHyu4t-g@mail.gmail.com>

Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> I didn't mean do it in all cases, I just meant the NullIfExpr case
> identified here. My point was that instead of modifying the evaluation
> code for EEOP_NULLIF to make it call
> MakeExpandedObjectReadOnlyInternal(), it would be easier to insert a
> EEOP_MAKE_READONLY step for the first argument of the EEOP_NULLIF
> step.

But then the NULLIF step would only have access to the R/O pointer,
no?  We do want to pass on a R/W pointer to the output, if we got
one, to handle cases like
	fconsumer(NULLIF(fproducer(...), ...), ...)
Admittedly that's a pretty edgy edge-case, but still we're leaving
money on the table if we don't do it.  So I think we have to deal
with the issue within NULLIF.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <1440980.1732562171@sss.pgh.pa.us>
Permalink:  ../1440980.1732562171@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1440980.1732562171@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18722: Processing arrays with plpgsql raises errors
  In-Reply-To: <1440980.1732562171@sss.pgh.pa.us>

* 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