Re: Function returning 2 columns evaluated twice when both columns are needed - Mailing list pgsql-general

From Tom Lane
Subject Re: Function returning 2 columns evaluated twice when both columns are needed
Date
Msg-id 8522.1255975348@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function returning 2 columns evaluated twice when both columns are needed  (Gerhard Wiesinger <lists@wiesinger.com>)
Responses Re: Function returning 2 columns evaluated twice when both columns are needed
List pgsql-general
Gerhard Wiesinger <lists@wiesinger.com> writes:
> On Mon, 19 Oct 2009, Tom Lane wrote:
>> Probably because you have the function declared VOLATILE.

> None of the function is declared VOLATILE. Any other idea?

[ shrug... ]  There are other possible reasons why the planner would
fail to flatten a subquery, but none of them apply to the example you
showed.  And your example function *was* VOLATILE, by default.

            regards, tom lane

pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Function returning 2 columns evaluated twice when both columns are needed
Next
From: Scott Marlowe
Date:
Subject: Re: autovacuum and immediate shutdown issues