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 4511.1255961364@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 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.

            regards, tom lane

pgsql-general by date:

Previous
From: Sergey Konoplev
Date:
Subject: Best practices for effective_io_concurrency
Next
From: "Bierbryer, Andrew"
Date:
Subject: Index Question