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 14:09:24
Message-ID: 4511.1255961364@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 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mitesh51 2009-10-19 14:18:42 Un successful Restoration of DATA using WAL files
Previous Message Sergey Konoplev 2009-10-19 12:20:49 Best practices for effective_io_concurrency