Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C187D133729E for ; Sat, 25 Sep 2010 16:10:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 18869-04 for ; Sat, 25 Sep 2010 19:10:51 +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 B3B2A1336FA7 for ; Sat, 25 Sep 2010 16:10:51 -0300 (ADT) 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 o8PJAnuD021089; Sat, 25 Sep 2010 15:10:49 -0400 (EDT) To: Thomas Kellerer cc: pgsql-jdbc@postgresql.org Subject: Re: Bug in getIndexInfo() with 9.0 JDBC driver In-reply-to: References: Comments: In-reply-to Thomas Kellerer message dated "Sat, 25 Sep 2010 12:01:29 +0200" Date: Sat, 25 Sep 2010 15:10:49 -0400 Message-ID: <21088.1285441849@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: 201009/49 X-Sequence-Number: 20919 Thomas Kellerer writes: > Thomas Kellerer wrote on 25.09.2010 11:38: >> in my program I'm using DatabaseMetaData.getIndexInfo(). >> >> This is working fine with the 8.4 driver on a 8.4 and 9.0 database. >> >> However when using the 9.0 driver (postgresql-9.0-801.jdbc4.jar) I'm getting the following exception when calling getIndexInfo(): >> >> 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. regards, tom lane