Re: If there are more than two functions in different schemas, the functions have the same name and same arguments, \df[+] only display the function that schema first appeared in the search_path.

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: If there are more than two functions in different schemas, the functions have the same name and same arguments, \df[+] only display the function that schema first appeared in the search_path.
Дата
Msg-id CAKFQuwYSAaQ1O_maDi2hBn-Vh8qe3AW8rE+-D-+fFAQ+86JhGw@mail.gmail.com
обсуждение исходный текст
Ответ на If there are more than two functions in different schemas, the functions have the same name and same arguments, \df[+] only display the function that schema first appeared in the search_path.  (金 <jinbinge@126.com>)
Список pgsql-hackers
On Sunday, January 15, 2023, 金 <jinbinge@126.com> wrote:


postgres=# \df fun1

                                      List of functions

 Schema | Name | Result data type |                Argument data types                 | Type 

--------+------+------------------+----------------------------------------------------+------

 public | fun1 | record           | arg1 integer, OUT arg2 integer, INOUT arg3 integer | func

(1 row)

Working as documented.
 

postgres=# SELECT pg_function_is_visible(16386);
 pg_function_is_visible 
------------------------
 t
(1 row)


 
postgres=# SELECT pg_function_is_visible(16389);  --Should display t?
 pg_function_is_visible 
------------------------
 f
(1 row)

No, visible means is the one found by looking through the current search_path, and the one in s1 is not visible for the very reason that the one in public is visible.

You need to read the Patterns section of the psql documentation where the behavior to expect is described.

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: Small miscellaneus fixes (Part II)
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply