Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A18049FA4C1 for ; Sun, 14 Jan 2007 02:17:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 75624-03 for ; Sun, 14 Jan 2007 02:17:45 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [204.127.192.84]) by postgresql.org (Postfix) with ESMTP id 2188C9FB1B8 for ; Sun, 14 Jan 2007 02:17:44 -0400 (AST) Received: from wolfgang.home (c-24-34-134-158.hsd1.ma.comcast.net[24.34.134.158]) by comcast.net (rwcrmhc14) with SMTP id <20070114061743m140032qgme>; Sun, 14 Jan 2007 06:17:43 +0000 Subject: Problem with JDBC version 8.0/1 vs. 7.4 From: Bob Fischer To: pgsql-jdbc@postgresql.org Content-Type: text/plain Date: Sun, 14 Jan 2007 01:17:42 -0500 Message-Id: <1168755462.7577.80.camel@wolfgang.home> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.844 tagged_above=0 required=5 tests=BAYES_50, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200701/92 X-Sequence-Number: 16457 Hello, I'm trying to run the SQL statement found below. Meaning, if I have a String sql set to the big hunk of text below the '----', I then call ResultSet rs = statement.executeQuery(sql); When I use the JDBC Driver v7.4, everything works just fine (and it returns some rows). But when I use JDBC Driver v8.0 or v8.1, I get the following Exception: org.postgresql.util.PSQLException: No results were returned by the query. at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240) Does anyone know what is causing this problem or how to fix it? For now I'm sticking with the 7.4 driver. Thanks, -- Bob ----------------------- create temporary table _ids (entityid int); delete from _ids; delete from _ids; insert into _ids (entityid) select entityid from persons where firstname ilike '%kent%' or lastname ilike '%kent%' union select entityid from organizations where name ilike '%kent%'; (select o.entityid, 'organizations' as relation, name as name , o.entityid = o.primaryentityid as isprimary from organizations o, _ids where o.entityid = _ids.entityid union select p.entityid, 'persons' as relation, (case when lastname is null then '' else lastname || ', ' end || case when firstname is null then '' else firstname || ' ' end || case when middlename is null then '' else middlename end) as name , p.entityid = p.primaryentityid as isprimary from persons p, _ids where p.entityid = _ids.entityid) order by relation, name; drop table _ids