Skip site navigation (1) Skip section navigation (2)

Re: Function is called multiple times in subselect

From: "Alex J(dot) Avriette" <alex(at)posixnap(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chris Campbell <chris(at)bignerdranch(dot)com>,PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>,Don Marco <mark(at)bignerdranch(dot)com>,Aaron Hillegass <aaron(at)bignerdranch(dot)com>
Subject: Re: Function is called multiple times in subselect
Date: 2004-03-12 10:55:49
Message-ID: 20040312105548.GQ6396@posixnap.net (view raw or flat)
Thread:
Lists: pgsql-bugs
On Thu, Mar 11, 2004 at 11:02:21PM -0500, Tom Lane wrote:
> Chris Campbell <chris(at)bignerdranch(dot)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(at)posixnap(dot)net
Alex J. Avriette, Unix Systems Gladiator
Liberty in your lifetime: http://www.freestateproject.org/

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-03-12 14:41:39
Subject: Re: Function is called multiple times in subselect
Previous:From: Enrico OrtmannDate: 2004-03-12 08:04:06
Subject: Re: BUG #1100: pd_dump doesn't work with upper case table names

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group