Re: Planner question regarding functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Chris Travers <chris(at)travelamericas(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Planner question regarding functions
Date: 2003-12-08 16:59:26
Message-ID: 18708.1070902766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> Chris Travers <chris(at)travelamericas(dot)com> wrote:
>> I suspect I know what the answer here is, but I thought I would ask
>> anyway. How transparent are SQL language functions from the planner's
>> perspective? For example if I create a table:

> In 7.4 simple SQL functions are inlined and work a lot like macros.
> I don't know if set returning functions are able to be inlined.

They are not. I suppose that a function consisting of just one SELECT
could be expanded in-line if it appears in FROM ... but it's not clear
what that accomplishes that you couldn't do just as well with a view.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-08 17:07:30 Re: Turning on/off debugging
Previous Message Tom Lane 2003-12-08 16:54:57 Re: CREATE RULE problem/question requesting workaround