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