Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 85CFD1337B8E for ; Fri, 31 Dec 2010 12:09:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15932-06 for ; Fri, 31 Dec 2010 16:09:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 26B301337B8D for ; Fri, 31 Dec 2010 12:09:23 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oBVG9LtZ001339; Fri, 31 Dec 2010 11:09:21 -0500 (EST) To: Thor Michael =?ISO-8859-1?Q?St=F8re?= cc: Kris Jurka , pgsql-jdbc@postgresql.org Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions In-reply-to: <1293806627.4629.42.camel@localhost> References: <1293738434.11427.34.camel@localhost> <1293806627.4629.42.camel@localhost> Comments: In-reply-to Thor Michael =?ISO-8859-1?Q?St=F8re?= message dated "Fri, 31 Dec 2010 15:43:47 +0100" Date: Fri, 31 Dec 2010 11:09:21 -0500 Message-ID: <1338.1293811761@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/94 X-Sequence-Number: 21332 Thor Michael =?ISO-8859-1?Q?St=F8re?= 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 of a function is implementation-dependent, so this is a compliant way of doing it. regards, tom lane