From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thor Michael Støre <thormichael@gmail.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions
Date: Fri, 31 Dec 2010 11:09:21 -0500
Message-ID: <1338.1293811761@sss.pgh.pa.us> (raw)
In-Reply-To: <1293806627.4629.42.camel@localhost>
References: <1293738434.11427.34.camel@localhost>
<alpine.BSO.2.00.1012302219220.2548@leary.csoft.net>
<1293806627.4629.42.camel@localhost>
Thor Michael =?ISO-8859-1?Q?St=F8re?= <thormichael@gmail.com> writes:
> On Thu, 2010-12-30 at 22:24 -0500, Kris Jurka wrote:
>> 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.
> Right, it says it should "uniquely" identify the function within the
> schema, which as far as I can tell means that for overloaded functions
> it would have to list up the input argument types. (Or at least the
> other only unique way to identify a function I can think of is the OID,
> which I can't believe one would want there.)
I'll bet a nickel that the expectation is for this to be pulled from
information_schema.routines.specific_name, which is defined thusly in
Postgres:
CAST(p.proname || '_' || CAST(p.oid AS text) AS sql_identifier)
... FROM pg_proc p
As best I can tell from the SQL spec, the <specific name> of a function
is implementation-dependent, so this is a compliant way of doing it.
regards, tom lane
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: tgl@sss.pgh.pa.us, thormichael@gmail.com, books@ejurka.com
Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions
In-Reply-To: <1338.1293811761@sss.pgh.pa.us>
References: <1293738434.11427.34.camel@localhost> <alpine.BSO.2.00.1012302219220.2548@leary.csoft.net> <1293806627.4629.42.camel@localhost> <1338.1293811761@sss.pgh.pa.us>
* 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