Re: Planner question regarding functions - Mailing list pgsql-general

From Tom Lane
Subject Re: Planner question regarding functions
Date
Msg-id 18708.1070902766@sss.pgh.pa.us
Whole thread Raw
In response to Re: Planner question regarding functions  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
>   Chris Travers <chris@travelamericas.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE RULE problem/question requesting workaround
Next
From: Tom Lane
Date:
Subject: Re: Turning on/off debugging