Обсуждение: inlined sql functions in 7.4

Поиск
Список
Период
Сортировка

inlined sql functions in 7.4

От
Aleksey Serba
Дата:
    Hi!

    I found the very useful feature into 7.4 release

> Release Notes 7.4:
>    Function-inlining for simple SQL functions
>    Simple SQL functions can now be inlined by including their SQL in the main query.
>    This improves performance by eliminating per-call overhead.
>    That means, simple SQL functions now behave like macros.

    but, i can't find any docs about syntax :(

    Could you point me in the right direction?

    Thx in advance

    Aleksey


Re: inlined sql functions in 7.4

От
Jeff Eckermann
Дата:
--- Aleksey Serba <aserba@voltweb.com> wrote:
>     Hi!
>
>     I found the very useful feature into 7.4 release
>
> > Release Notes 7.4:
> >    Function-inlining for simple SQL functions
> >    Simple SQL functions can now be inlined by
> including their SQL in the main query.
> >    This improves performance by eliminating
> per-call overhead.
> >    That means, simple SQL functions now behave
> like macros.
>
>     but, i can't find any docs about syntax :(
>
>     Could you point me in the right direction?

This happens automatically, i.e. you don't need to do
anything.  It is a performance optimization in the
backend.

>
>     Thx in advance
>
>     Aleksey
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

Re: inlined sql functions in 7.4

От
Tom Lane
Дата:
Aleksey Serba <aserba@voltweb.com> writes:
>     I found the very useful feature into 7.4 release
>> Function-inlining for simple SQL functions
>     but, i can't find any docs about syntax :(

There isn't any --- it happens automatically if the planner thinks it's
an appropriate transformation.

            regards, tom lane

Re: inlined sql functions in 7.4

От
Aleksey Serba
Дата:
>>     I found the very useful feature into 7.4 release
>>> Function-inlining for simple SQL functions
>>     but, i can't find any docs about syntax :(

TL> There isn't any --- it happens automatically if the planner thinks it's
TL> an appropriate transformation.
TL>                         regards, tom lane

    Ops. I was mistaken.
    I'm sorry for wasting your time.

    Aleksey