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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: notegihu(at)confused(dot)at
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17199: Calling stored procedure with stable function as argument results in wrong result
Date: 2021-09-21 15:01:11
Message-ID: 1980152.1632236471@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> When a function that returns just a row count of a table is marked as STABLE
> and is called from a stored procedure as argument, the result of the
> function is different than when the function is called beforehand and stored
> to a local variable.

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.

Will fix, thanks for the report!

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-09-21 15:49:56 Re: BUG #17199: Calling stored procedure with stable function as argument results in wrong result
Previous Message PG Bug reporting form 2021-09-21 12:52:14 BUG #17199: Calling stored procedure with stable function as argument results in wrong result