Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions
Date
Msg-id alpine.BSO.2.00.1012302219220.2548@leary.csoft.net
Whole thread Raw
In response to java.sql.DatabaseMetaData.getProcedures and overloaded functions  (Thor Michael Støre <thormichael@gmail.com>)
Responses Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions
List pgsql-jdbc

On Thu, 30 Dec 2010, Thor Michael St?re wrote:

> Is my understanding correct in that JDBC doesn't actually provide a
> proper way of inspecting overloaded stored procedures, and so to get
> that information reliably you should query the PostgreSQL system
> catalogs? At least when I try to use the java.sql.DatabaseMetaData
> getProcedures and getProcedureColumns methods on overloaded procedures I
> see them repeated without any explicit distinction between them, except
> of course that getProcedureColumns gives different datatypes for each
> procedure.
>

Hmm, the JDBC4 spec has added an additional column to the getProcedures
return value called SPECIFIC_NAME which might be for differentiating
between overloaded functions.  It's not clear whether the function is
supposed to be callable by that specific name or not.  It's also awkard to
use because you can't pass the SPECIFIC_NAME from getProcedures to
getProcedureColumns, so you'd have to do your own filtering of that
ResultSet.


http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getProcedures%28java.lang.String,%20java.lang.String,%20java.lang.String%29


Kris Jurka

pgsql-jdbc by date:

Previous
From: Thor Michael Støre
Date:
Subject: java.sql.DatabaseMetaData.getProcedures and overloaded functions
Next
From: Thor Michael Støre
Date:
Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions