pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15515: DatabaseMetadata.getProcedures and getFunctions return objects of either type
2+ messages / 2 participants
[nested] [flat]
* BUG #15515: DatabaseMetadata.getProcedures and getFunctions return objects of either type
@ 2018-11-21 13:21 PG Bug reporting form <noreply@postgresql.org>
2019-05-24 13:17 ` Re: BUG #15515: DatabaseMetadata.getProcedures and getFunctions return objects of either type Dave Cramer <davecramer@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2018-11-21 13:21 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: mainstreet439@gmail.com
The following bug has been logged on the website:
Bug reference: 15515
Logged by: main street
Email address: mainstreet439@gmail.com
PostgreSQL version: 11.1
Operating system: windows
Description:
When an application calls DatabaseMetadata.getFunctions the Resultset
returned by the driver may include functions and vice versa re
DatabaseMetadata.getProcedures.
Using various PostregSQL JDBC drivers such as 42.2.5 against PostgresSQL 11
or pre-11 servers will return both types of objects.
In essence, we might expect the driver to treat a void return type as being
an indicator of a procedure versus a function if the pre-11 style of syntax
was used.
Using the new PostgresSQL 11 CREATE PROCEDURE syntax does not change the
responses.
Example objects
CREATE FUNCTION pinint(pint integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
P1 integer;
begin
P1:= PINT;
end;
$$;
CREATE FUNCTION pinint(pint integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
P1 integer;
begin
P1:= PINT;
end;
$$;
If you were to inspect the Resultset returned by
DatabaseMetadata.getProcedures you will see a response as shown.
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getProcedures-java.lang.Str...-
[null],[dbcert],[finint],[null],[null],[null],[null],[2],[finint_16395]
[null],[dbcert],[pinint],[null],[null],[null],[null],[2],[pinint_16394]
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15515: DatabaseMetadata.getProcedures and getFunctions return objects of either type
2018-11-21 13:21 BUG #15515: DatabaseMetadata.getProcedures and getFunctions return objects of either type PG Bug reporting form <noreply@postgresql.org>
@ 2019-05-24 13:17 ` Dave Cramer <davecramer@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Cramer @ 2019-05-24 13:17 UTC (permalink / raw)
To: mainstreet439@gmail.com; pgsql-bugs@lists.postgresql.org
Well currently the driver doesn't know what to do with procedures and as a
result nothing has been done to deal with the differences.
a better place to post this will be https://github.com/pgjdbc/pgjdbc/issues
Dave Cramer
On Wed, 21 Nov 2018 at 08:22, PG Bug reporting form <noreply@postgresql.org>
wrote:
> The following bug has been logged on the website:
>
> Bug reference: 15515
> Logged by: main street
> Email address: mainstreet439@gmail.com
> PostgreSQL version: 11.1
> Operating system: windows
> Description:
>
> When an application calls DatabaseMetadata.getFunctions the Resultset
> returned by the driver may include functions and vice versa re
> DatabaseMetadata.getProcedures.
>
> Using various PostregSQL JDBC drivers such as 42.2.5 against PostgresSQL 11
> or pre-11 servers will return both types of objects.
>
> In essence, we might expect the driver to treat a void return type as being
> an indicator of a procedure versus a function if the pre-11 style of syntax
> was used.
> Using the new PostgresSQL 11 CREATE PROCEDURE syntax does not change the
> responses.
>
> Example objects
>
> CREATE FUNCTION pinint(pint integer) RETURNS void
> LANGUAGE plpgsql
> AS $$
> declare
> P1 integer;
> begin
> P1:= PINT;
> end;
> $$;
>
> CREATE FUNCTION pinint(pint integer) RETURNS void
> LANGUAGE plpgsql
> AS $$
> declare
> P1 integer;
> begin
> P1:= PINT;
> end;
> $$;
>
> If you were to inspect the Resultset returned by
> DatabaseMetadata.getProcedures you will see a response as shown.
>
> https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getProcedures-java.lang.Str...-
>
> [null],[dbcert],[finint],[null],[null],[null],[null],[2],[finint_16395]
> [null],[dbcert],[pinint],[null],[null],[null],[null],[2],[pinint_16394]
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-05-24 13:17 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 13:21 BUG #15515: DatabaseMetadata.getProcedures and getFunctions return objects of either type PG Bug reporting form <noreply@postgresql.org>
2019-05-24 13:17 ` Dave Cramer <davecramer@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox