Re: [HACKERS] regproc and when to schema-qualify - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] regproc and when to schema-qualify
Date
Msg-id 21477.1497198904@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] regproc and when to schema-qualify  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> The manual says regproc "will display schema-qualified names on output
> if the object would not be found in the current search path without
> being qualified."

That's less than the full truth :-(

> Is regproc displaying the schema in this case because there are two
> overloaded flavors of ginarrayextract, though both are in pg_catalog?

Yes, see the test in regprocout:
            * Would this proc be found (uniquely!) by regprocin? If not,            * qualify it.

Of course, in a situation like this, schema-qualification is not enough to
save the day; regprocin will still fail because the name is ambiguous.
You really need to use regprocedure not regproc if you want any guarantees
about the results.

(The fact that we have regproc at all is a bit of a historical accident,
caused by some limitations of the bootstrap mode.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [HACKERS] Make ANALYZE more selective about what is a "mostcommon value"?
Next
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!