Re: EXPLAIN doesn't show the actual function expression for FunctionScan

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: EXPLAIN doesn't show the actual function expression for FunctionScan
Date: 2010-08-24 17:03:45
Message-ID: 20100824170345.GA21687@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 24, 2010 at 12:06:34PM -0400, Tom Lane wrote:
> I wrote:
> > Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> >> If you try to put all that on the same line, I think it might get
> >> awkwardly long. Perhaps something like:
>
> >> Function Scan on function_name
> >> Expression: function_name(function_arg1, function_arg2, ...)
>
> > Yeah, that's what I had in mind, but I'm still fumbling for the right
> > label. "Expression" seems a bit too generic.
>
> How about "Function Call"?
>
> A moment's hacking later:
>
> regression=# explain verbose SELECT lv|| op|| rv FROM unnest(ARRAY[
> ROW('1.2.2'::semver, '='::text, '1.2.2'::semver),
> ROW('1.2.23', '=', '1.2.23')
> ]) AS f(lv semver, op text, rv semver);
> QUERY PLAN
> --------------------------------------------------------------------------------------------------------------------------------
> Function Scan on pg_catalog.unnest f (cost=0.00..1.50 rows=100 width=96)
> Output: (((lv)::text || op) || (rv)::text)
> Function Call: unnest(ARRAY[ROW(('1.2.2'::text)::semver, '='::text, ('1.2.2'::text)::semver), ROW('1.2.23', '=', '1.2.23')])
> (3 rows)
>
> Look reasonable?

This would have helped me a good deal a couple of times this week :)

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2010-08-24 17:13:27 Re: EXPLAIN doesn't show the actual function expression for FunctionScan
Previous Message Alvaro Herrera 2010-08-24 16:53:45 Re: Unable to drop role