Re: BUG #17199: Calling stored procedure with stable function as argument results in wrong result

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: notegihu@confused.at
Cc: pgsql-bugs@lists.postgresql.org
Date: 2021-09-21T15:49:56Z
Lists: pgsql-bugs

Attachments

I wrote:
> Ugh.  Looks like I broke this in 84f5c2908, by not thinking about the
> possibility that a CALL's argument expressions would need an up-to-date
> snapshot.

Concretely, the attached seems to take care of it.  I'll refrain
from pushing this till later, though, since v14 is frozen for rc1
for a few hours more.

			regards, tom lane

Commits

  1. Fix misevaluation of STABLE parameters in CALL within plpgsql.