Re: EXPLAIN VERBOSE with parallel Aggregate - Mailing list pgsql-hackers

From Tom Lane
Subject Re: EXPLAIN VERBOSE with parallel Aggregate
Date
Msg-id 16652.1461215655@sss.pgh.pa.us
Whole thread Raw
In response to Re: EXPLAIN VERBOSE with parallel Aggregate  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: EXPLAIN VERBOSE with parallel Aggregate  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> I'd like to admit that I'm a bit confused as to why
> generate_function_name(), when it already knows the funcid, bothers to
> call func_get_detail(), which performs a search for the function based
> on the name and argument types, to find the function, most likely with
> the same funcid as the one which it already knew.

> Could you explain why this has to happen?

The point is exactly to find out whether a search for the function
given only the name and argument types would find the same function,
or a similar function in a different schema --- which would happen
if that other schema is earlier in the search path than the desired
one, or maybe the desired one isn't in search_path at all.  In such
a case we must schema-qualify the function name in the printed
expression.

To some extent this is because ruleutils serves two masters.  We would
probably not care that much about schema exactness for EXPLAIN's purposes,
but we do care for dumping views and rules.
        regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: EXPLAIN VERBOSE with parallel Aggregate
Next
From: Shay Rojansky
Date:
Subject: Wire protocol compression