BUG #16557: getProcedureColumns() function returns columns, when there is no existing Stored Procedure in the DB

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #16557: getProcedureColumns() function returns columns, when there is no existing Stored Procedure in the DB
Дата
Msg-id 16557-92b633963d43f893@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #16557: getProcedureColumns() function returns columns, when there is no existing Stored Procedure in the DB  (Dave Cramer <davecramer@postgres.rocks>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16557
Logged by:          Adarshdeep Cheema
Email address:      adarshdeep.cheema@ibm.com
PostgreSQL version: 12.2
Operating system:   Windows
Description:

Create any user defined function using Postgres 12.3 Server, we are using
postgresql-42.2.11 JDBC driver

DDLs:
CREATE FUNCTION findec(pdec numeric) RETURNS numeric
    LANGUAGE plpgsql
    AS $$
declare r decimal(7,2);
begin
    r = PDEC;
    return r;
end;
$$;


a) When we use the following Java code, then we get nothing as we do no have
any Stored Procedure defined, which is expected
  resultSet= metadata.getProcedures(null , "public", null); ,
  while (resultSet.next()){
           
            System.out.print(resultSet.getString(1)+"    ");
            System.out.print(resultSet.getString(2)+"    ");
            System.out.print(resultSet.getString(3)+"    ");
            System.out.print(resultSet.getString(4)+"    ");
            System.out.print(resultSet.getString(5)+"    ");
            System.out.println(resultSet.getString(6)+"    ");
        }

b) Now change the JAVA code to the following and you will get two columns in
the resultSet, which is a bug as there is no StoredProcedure Defined in the
database

 resultSet= metadata.getProcedureColumns(null , "public", "findec", null);
,
  while (resultSet.next()){
           
            System.out.print(resultSet.getString(1)+"    ");
            System.out.print(resultSet.getString(2)+"    ");
            System.out.print(resultSet.getString(3)+"    ");
            System.out.print(resultSet.getString(4)+"    ");
            System.out.print(resultSet.getString(5)+"    ");
            System.out.println(resultSet.getString(6)+"    ");
        }


OUTPUT:
null    public    findec    returnValue    5    2    
null    public    findec    pdec    1    2


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #16476: pgp_sym_encrypt_bytea with compress-level=6 : Wrong key or corrupt data
Следующее
От: tutiluren@tutanota.com
Дата:
Сообщение: Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows.