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/