Re: Function is called multiple times in subselect - Mailing list pgsql-bugs

From Alex J. Avriette
Subject Re: Function is called multiple times in subselect
Date
Msg-id 20040312105548.GQ6396@posixnap.net
Whole thread Raw
In response to Re: Function is called multiple times in subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Function is called multiple times in subselect
Re: Function is called multiple times in subselect
List pgsql-bugs
On Thu, Mar 11, 2004 at 11:02:21PM -0500, Tom Lane wrote:
> Chris Campbell <chris@bignerdranch.com> writes:
> > I don't think this should be happening (PostgreSQL 7.4.1).
>
> Sorry, this isn't a bug.  Flattening the subquery is generally desirable
> behavior.

And if you are concerned about the query's cost vs its actual output
(you weren't clear in your original message), there is the 'iscachable'
pragma for functions.

Alex

--
alex@posixnap.net
Alex J. Avriette, Unix Systems Gladiator
Liberty in your lifetime: http://www.freestateproject.org/

pgsql-bugs by date:

Previous
From: Enrico Ortmann
Date:
Subject: Re: BUG #1100: pd_dump doesn't work with upper case table names
Next
From: Tom Lane
Date:
Subject: Re: Function is called multiple times in subselect