Is there any way, short of using a debugger with a strategically placed 
breakpoint, to tell if a SQL function has been inlined?

Joe


Sat, 08 Nov 2003 19:14:32 -0800
Joe Conway <mail@joeconway.com>
How to tell if SQL function gets inlined?
Joe Conway wrote:
> Is there any way, short of using a debugger with a strategically placed 
> breakpoint, to tell if a SQL function has been inlined?

I think you will only see it with debug_print_plan enabled.  You can
change client_min_messages to see that in your psql session.  I think
the parse tree doesn't do the inlining, only the optimizer.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Sat, 8 Nov 2003 22:36:03 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: How to tell if SQL function gets inlined?
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Joe Conway wrote:
>> Is there any way, short of using a debugger with a strategically placed 
>> breakpoint, to tell if a SQL function has been inlined?

> I think you will only see it with debug_print_plan enabled.

If the function is in the WHERE clause then you can see it in EXPLAIN
output.  Functions in the SELECT list you can't see without wading
through EXPLAIN VERBOSE (or equivalently debug_print_plan).

			regards, tom lane

Sat, 08 Nov 2003 23:00:36 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: How to tell if SQL function gets inlined? 