inlined sql functions in 7.4

Started by Aleksey Serbaabout 22 years ago4 messagesgeneral
Jump to latest
#1Aleksey Serba
aserba@voltweb.com

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

#2Jeff Eckermann
jeff_eckermann@yahoo.com
In reply to: Aleksey Serba (#1)
Re: inlined sql functions in 7.4
--- 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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Aleksey Serba (#1)
Re: inlined sql functions in 7.4

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

#4Aleksey Serba
aserba@voltweb.com
In reply to: Tom Lane (#3)
Re: inlined sql functions in 7.4

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