[HACKERS] regproc and when to schema-qualify

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема [HACKERS] regproc and when to schema-qualify
Дата
Msg-id 593D6973.7000101@anastigmatix.net
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017: Foreign Key Arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: [HACKERS] regproc and when to schema-qualify  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: [HACKERS] PG10 Partitioned tables and relation_is_updatable()
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: [HACKERS] Make ANALYZE more selective about what is a "mostcommon value"?