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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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