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.
От | 金 |
---|---|
Тема | 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 | 360c392.330b.185b93d644c.Coremail.jinbinge@126.com обсуждение исходный текст |
Ответы |
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.
|
Список | pgsql-hackers |
Hi,
I find if there are more than one functions in different schemas,
and the functions have the same name and the same arguments,
\df[+] only display the function that schema earlier appeared in the search_path.
And SELECT pg_function_is_visible(funoid) returns f.
CREATE OR REPLACE FUNCTION fun1(arg1 INT, arg2 OUT int, arg3 IN OUT int)
RETURNS RECORD
AS
$$
BEGIN
arg3 := arg1 + arg2;
END;
$$ LANGUAGE plpgsql;
CREATE OR REPLACE PROCEDURE proc1(arg1 INT, arg2 IN OUT INT, arg3 OUT INT)
AS
$$
BEGIN
arg3 := arg1 + arg2;
END;
$$ LANGUAGE plpgsql;
postgres=# \df
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+-------+------------------+-------------------------------------------------------+------
public | fun1 | record | arg1 integer, OUT arg2 integer, INOUT arg3 integer | func
public | proc1 | | IN arg1 integer, INOUT arg2 integer, OUT arg3 integer | proc
(2 rows)
set search_path="$user", public, s1;
CREATE SCHEMA s1;
CREATE OR REPLACE FUNCTION s1.fun1(arg1 INT, arg2 OUT int, arg3 IN OUT int)
RETURNS RECORD
AS
$$
BEGIN
arg3 := arg1 + arg2;
END;
$$ LANGUAGE plpgsql;
CREATE OR REPLACE PROCEDURE s1.proc1(arg1 INT, arg2 IN OUT INT, arg3 OUT INT)
AS
$$
BEGIN
arg3 := arg1 + arg2;
END;
$$ LANGUAGE plpgsql;
postgres=# \df
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+-------+------------------+-------------------------------------------------------+------
public | fun1 | record | arg1 integer, OUT arg2 integer, INOUT arg3 integer | func
public | proc1 | | IN arg1 integer, INOUT arg2 integer, OUT arg3 integer | proc
(2 rows)
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
В списке pgsql-hackers по дате отправления:
Предыдущее
От: Amit KapilaДата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply