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

From Chapman Flack
Subject [HACKERS] regproc and when to schema-qualify
Date
Msg-id 593D6973.7000101@anastigmatix.net
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: [HACKERS] regproc and when to schema-qualify  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I was idly following along in GSoC 2017: Foreign Key Arrays
when I noticed this:

=# select * from pg_amproc where amprocfamily = 2745;amprocfamily | amproclefttype | amprocrighttype | amprocnum |
amproc
--------------+----------------+-----------------+-----------+        2745 |           2277 |            2277 |
2|
 
pg_catalog.ginarrayextract        2745 |           2277 |            2277 |         3 |
ginqueryarrayextract
...

where only ginarrayextract is schema-qualified. It seems to be
regproc's output procedure doing it:

=# select 2743::regproc, 2774::regproc;         regproc           |       regproc
----------------------------+----------------------pg_catalog.ginarrayextract | ginqueryarrayextract


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."

Is regproc displaying the schema in this case because there are two
overloaded flavors of ginarrayextract, though both are in pg_catalog?
Could it be searching for the object by name, ignoring the argument
signature, and just detecting that it hit one with a different OID first?

-Chap



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()
Next
From: Dean Rasheed
Date:
Subject: Re: [HACKERS] Make ANALYZE more selective about what is a "mostcommon value"?