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

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

On Mon, 19 Oct 2009, Tom Lane wrote:

> Gerhard Wiesinger <lists(at)wiesinger(dot)com> writes:
>> On Sun, 18 Oct 2009, Tom Lane wrote:
>>> The OFFSET bit is a kluge, but is needed to keep the planner from
>>> flattening the subquery and undoing your work.
>
>> Thnx Tom. It also works without the OFFSET kludge. Any ideas why?
>
> Probably because you have the function declared VOLATILE.
>

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

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

In response to

Responses

Browse pgsql-general by date

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