Received: from m4.c2.telstra-mm.net.au (m4.c2.telstra-mm.net.au [24.192.3.19]) by hub.org (8.9.3/8.9.1) with ESMTP id LAA74983 for ; Fri, 23 Apr 1999 11:28:25 -0400 (EDT) (envelope-from jbarnett@pobox.com) Received: from m5.c2.telstra-mm.net.au (m5.c2.telstra-mm.net.au [24.192.3.20]) by m4.c2.telstra-mm.net.au (8.8.6 (PHNE_14041)/8.8.6) with ESMTP id BAA08846; Sat, 24 Apr 1999 01:28:17 +1000 (EST) X-BPC-Relay-Envelope-From: jbarnett@pobox.com X-BPC-Relay-Sender-Host: m5.c2.telstra-mm.net.au [24.192.3.20] X-BPC-Relay-Info: Message delivered as CC or BCC. Received: from persephone.hsys.com.au (CPE-24-192-48-162.nsw.bigpond.net.au [24.192.48.162]) by m5.c2.telstra-mm.net.au (8.8.6 (PHNE_14041)/8.8.6) with SMTP id BAA11312; Sat, 24 Apr 1999 01:28:16 +1000 (EST) Received: by localhost with Microsoft MAPI; Sat, 24 Apr 1999 01:26:14 +1000 Message-ID: <01BE8DF1.71754C60.jbarnett@pobox.com> From: Jon Barnett Reply-To: "jbarnett@pobox.com" To: "'Herouth Maoz'" , "'pgsql-interfaces@hub.org'" Subject: RE: [INTERFACES] JDBC next() method Date: Sat, 24 Apr 1999 01:26:12 +1000 X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tuesday, 20 April 1999 1:35, Herouth Maoz [SMTP:herouth@oumail.openu.ac.il] wrote: > At 15:57 +0300 on 14/04/1999, Jon Barnett wrote: > > > > I had expected that an empty result set would be > > returned if the history table is empty (0 rows returned for the select), > > and > > queryResult.next() would be false. Is this an incorrect interpretation > >on my > > part? > > It is. In PostgreSQL, when an aggregate function is used, it always returns > one row containing one field. If it had no values that matched the query, > that one field is NULL. The question is less one of "what is required to correctly interpret the result from the postgresql jdbc driver" and more a case of determining whether this result conforms to the jdbc api definitions. To re-phrase this; if I employed a different JDBC driver, would I obtain the same result? For after all, the goal of the JDBC layer is to provide a consistent interface, independent of the database to which you are connecting, particularly when you can late bind the driver (specify the driver you want to use at run-time). Best regards, Jon.