Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C6F1D1337B6D for ; Sat, 25 Sep 2010 17:46:54 -0300 (ADT) 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 85522-02 for ; Sat, 25 Sep 2010 20:46:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 5FAAA1336DB6 for ; Sat, 25 Sep 2010 17:46:47 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ozbdr-0004PP-9e for pgsql-jdbc@postgresql.org; Sat, 25 Sep 2010 22:46:43 +0200 Received: from ppp-188-174-79-96.dynamic.mnet-online.de ([188.174.79.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Sep 2010 22:46:43 +0200 Received: from spam_eater by ppp-188-174-79-96.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Sep 2010 22:46:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: Bug in getIndexInfo() with 9.0 JDBC driver Date: Sat, 25 Sep 2010 22:46:44 +0200 Lines: 23 Message-ID: References: <21088.1285441849@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp-188-174-79-96.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: <21088.1285441849@sss.pgh.pa.us> 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: 201009/50 X-Sequence-Number: 20920 Tom Lane wrote on 25.09.2010 21:10: >>> ERROR: argument to pg_get_expr() must come from system catalogs >>> [SQL State=42501] org.postgresql.util.PSQLException: ERROR: >>> argument to pg_get_expr() must come from system catalogs > >> I had a look at AbstractJdbc2DatabaseMetaData, and I think the >> solution would be to push down the call pg_get_expr() into the >> derived table to avoid the error: > > Actually, I think we'd better fix this on the backend side, because > it's going to break for all branches not just 9.0 when the next set > of minor releases come out. I think we can make the code that's > checking the argument of pg_get_expr() recurse into sub-selects to > verify validity. > I assume putting out a new driver build is a lot quicker than releasing 9.0.1 and as this problem affects any JDBC based query tool (as they usually display table & index information), it's probably worthwhile fixing it in the driver first. What I find a bit confusing is that the JUnit test works fine and it *is* testing getIndexInfo(). So there must be a bit more than what I can reproduce. Regards Thomas