Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 73ADD1337B84 for ; Thu, 30 Dec 2010 23:24:30 -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 90718-08 for ; Fri, 31 Dec 2010 03:24:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 64D9D1337B5D for ; Thu, 30 Dec 2010 23:24:21 -0400 (AST) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 0282D28429; Thu, 30 Dec 2010 22:24:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=9c/6oggl/iIVralEUbEFQxTGBp0=; b=gQn4ar ca5Ix5nBE/Ws3+H6grKRbDBOt7EJly2qdoGOgTuksTlsrXeCi5K94FfOTidpvF5o 7PhA0+izJWL9jmQRxxnKtA4QcyNiwioyq9Gd4KqiVTjwq+Sb/DHGk85qw/xGKHvd Pi4xNPEGHRnU69WEQNWE+YoqXUlzS/ARirA+0= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 000C228410; Thu, 30 Dec 2010 22:24:20 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 1112) id E9B02AB14; Thu, 30 Dec 2010 22:24:20 -0500 (EST) Date: Thu, 30 Dec 2010 22:24:20 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: =?ISO-8859-15?Q?Thor_Michael_St=F8re?= cc: pgsql-jdbc@postgresql.org Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions In-Reply-To: <1293738434.11427.34.camel@localhost> Message-ID: References: <1293738434.11427.34.camel@localhost> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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/91 X-Sequence-Number: 21329 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