pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Thor Michael Støre <thormichael@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions
Date: Thu, 30 Dec 2010 22:24:20 -0500 (EST)
Message-ID: <alpine.BSO.2.00.1012302219220.2548@leary.csoft.net> (raw)
In-Reply-To: <1293738434.11427.34.camel@localhost>
References: <1293738434.11427.34.camel@localhost>



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.lan...


Kris Jurka



view thread (8+ messages)  latest in thread

Message-ID: <alpine.BSO.2.00.1012302219220.2548@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1012302219220.2548@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1012302219220.2548@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, thormichael@gmail.com
  Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions
  In-Reply-To: <alpine.BSO.2.00.1012302219220.2548@leary.csoft.net>
  References: <1293738434.11427.34.camel@localhost> <alpine.BSO.2.00.1012302219220.2548@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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