Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 30FC91337B93 for ; Sun, 2 Jan 2011 16:47:18 -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 28321-01 for ; Sun, 2 Jan 2011 20:47:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by mail.postgresql.org (Postfix) with ESMTP id 690CB1337B53 for ; Sun, 2 Jan 2011 16:47:10 -0400 (AST) Received: by ewy5 with SMTP id 5so5888106ewy.19 for ; Sun, 02 Jan 2011 12:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=H2v8pC6ktIOtqSFnV0a0OsqJLTXa+uRrFGFGYYVnST8=; b=SJ316NjxKSp6x91srCmSFt+Bz4BDlx+S3WlcNF0dBXNHQBUw7xRa1Yrm+/lF6R3QAu 7phuN1EAN0Vq3jpwDdnev+X5CHH8ufQyUyKsmXXN7+IpgPwwzMoMCl/D26P+RTc9/8QS FRvQD3JEX4zzXQKtHAQNJjRBpjx+Pid5oQGn0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=okUDD30ZZVULyC9wXb2GtO5jI3LmnYhrrYbG/zaDhWcIPP9t79CjF5XpCLxB+hCiv3 Rf638awU0WpnqTU6w4Lk2+bwbaN5/dQazYI5AoLKnMequ0LAnms10SnBsIgPp+l+mvgs eggIcVv2wH2LevezvJY7Y+5YYaAne+RK880PE= Received: by 10.213.14.81 with SMTP id f17mr1230106eba.96.1294001229188; Sun, 02 Jan 2011 12:47:09 -0800 (PST) Received: from [192.168.0.100] (238.80-202-60.nextgentel.com [80.202.60.238]) by mx.google.com with ESMTPS id u1sm14223696eeh.22.2011.01.02.12.47.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 Jan 2011 12:47:07 -0800 (PST) Subject: Re: java.sql.DatabaseMetaData.getProcedures and overloaded functions From: Thor Michael =?ISO-8859-1?Q?St=F8re?= To: Tom Lane Cc: Kris Jurka , pgsql-jdbc@postgresql.org In-Reply-To: <1338.1293811761@sss.pgh.pa.us> References: <1293738434.11427.34.camel@localhost> <1293806627.4629.42.camel@localhost> <1338.1293811761@sss.pgh.pa.us> Content-Type: text/plain Date: Sun, 02 Jan 2011 21:47:07 +0100 Message-Id: <1294001227.4756.306.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201101/1 X-Sequence-Number: 21333 On Fri, 2010-12-31 at 11:09 -0500, Tom Lane wrote: > Thor Michael =?ISO-8859-1?Q?St=F8re?= writes: > > 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. Aah, wasn't aware of that, that makes sense. Also, I see SPECIFIC_NAME was added to JDBC 4, so I imagine that to correctly add it one would override getProcedures and getProcedureColumns in org.postgresql.jdbc4.AbstractJdbc4DatabaseMetaData and have them return the additional column(s). I took a look at the code and it seem straight forward enough for getProcedures, but getProcedureColumns has six other new columns as well and seems a bit hairier so I'm not sure if should throw myself over adding this. Thanks either way to everyone, I quite understand the state of things now. - thormick