X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7FB7B3AC055 for ; Tue, 28 Dec 2004 14:56:09 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74666-01 for ; Tue, 28 Dec 2004 14:56:00 +0000 (GMT) Received: from mnc.ch (unknown [212.23.250.43]) by svr1.postgresql.org (Postfix) with ESMTP id 6E62F3AC1A8 for ; Tue, 28 Dec 2004 14:56:03 +0000 (GMT) Received: (qmail 26396 invoked from network); 28 Dec 2004 15:56:02 +0100 Received: from 62-2-77-204.business.cablecom.ch (HELO meuh.mnc.ch) (62.2.77.204) by www.mnc.ch.com with SMTP; 28 Dec 2004 15:56:02 +0100 Received: by meuh.mnc.ch (Postfix, from userid 1000) id 700D023F117; Tue, 28 Dec 2004 15:56:29 +0100 (CET) To: pg@fastcrypt.com Cc: Daniel Schaedler , pgsql-jdbc@postgresql.org Subject: Re: problem to get nextval of a sequence References: <41D15580.3050700@daniel.schaedler.name> <87zmzyblx3.fsf@meuh.mnc.ch> <41D1608B.10109@daniel.schaedler.name> <41D16830.7000800@fastcrypt.com> From: Guillaume Cottenceau Date: 28 Dec 2004 15:56:29 +0100 In-Reply-To: <41D16830.7000800@fastcrypt.com> Message-ID: <87oegea2ua.fsf@meuh.mnc.ch> Lines: 14 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.062 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/200 X-Sequence-Number: 11866 Dave Cramer writes: > Daniel, > > The spec says that you must call next to position the cursor. What > happens if nothing comes back? ie an empty result set ? With previous versions of postgres (and/or the jdbc driver?) it was possible to get results with the cursor positioned before the first row; it returned results from the first row. That's probably the reason of the buggy code of Daniel. -- Guillaume Cottenceau