Re: Function returning 2 columns evaluated twice when both columns are needed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gerhard Wiesinger <lists(at)wiesinger(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Function returning 2 columns evaluated twice when both columns are needed
Date: 2009-10-19 18:02:28
Message-ID: 8522.1255975348@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gerhard Wiesinger <lists(at)wiesinger(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-10-19 18:26:26 Re: autovacuum and immediate shutdown issues
Previous Message Christophe Pettus 2009-10-19 18:01:47 Re: Function returning 2 columns evaluated twice when both columns are needed