获取PostgreSQL存储过程的参数和结果类型的过程?

Procedure to get the parameters and result type of a PostgreSQL stored procedure?

获取存储过程的参数和return类型的过程是什么? (Google 没有帮助 :-( ).

大致如下:

using (var conn = new Npgsql.NpgsqlConnection(connectionString: c))
        {
            conn.Open();

            using (var cmd = con.CreateCommand())
            {
                cmd.CommandText = "\"GetAllDx\"";
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.GETPARAMETERS()????????

            }
        }

PostgreSQL 9.5
Npgsql 3.0.5

这是一种方法:

SELECT pg_get_function_result(oid), pg_get_function_arguments(oid)
FROM pg_proc
WHERE proname = 'GetAllDx'

您可能还会发现这很有用(尽管此查询 returns 比您要求的多):

SELECT oid::regprocedure FROM pg_proc WHERE proname = 'GetAllDx'