Re: [PG19] plpgsql: SELECT INTO sets FOUND wrongly after a function becomes a SRF - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PG19] plpgsql: SELECT INTO sets FOUND wrongly after a function becomes a SRF
Date
Msg-id 1337576.1791239758@sss.pgh.pa.us
Whole thread
In response to [PG19] plpgsql: SELECT INTO sets FOUND wrongly after a function becomes a SRF  (shihao zhong <zhong950419@gmail.com>)
Responses Re: [PG19] plpgsql: SELECT INTO sets FOUND wrongly after a function becomes a SRF
List pgsql-hackers
shihao zhong <zhong950419@gmail.com> writes:
> I used Opus to analyze the new features in PG19, and it found a problem
> with the "SELECT simple-expression INTO var" fast path from ce8d5fe0e28.

Good catch, and I concur with your fix.  While looking at it
I also realized that the bit with

                 if (expr->plan == NULL)
                     exec_prepare_plan(estate, expr, 0);

is quite useless: we dealt with expr->plan == NULL a few lines
earlier, so this if-test can never succeed.  Pushed with that
change.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mihail Nikalayeu
Date:
Subject: Re: Logical replication: lost updates/deletes and invalid log messages caused by SnapshotDirty + concurrent updates
Next
From: Mihail Nikalayeu
Date:
Subject: Re: [BUG?] check_exclusion_or_unique_constraint false negative