Received: from mail.rdc1.md.home.com (imail@ha1.rdc1.md.home.com [24.2.2.66]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA89683 for ; Wed, 28 Jul 1999 20:52:49 -0400 (EDT) (envelope-from byron.nikolaidis@home.com) Received: from home.com ([24.4.141.52]) by mail.rdc1.md.home.com (InterMail v4.01.01.00 201-229-111) with ESMTP id <19990729005247.CILO9894.mail.rdc1.md.home.com@home.com>; Wed, 28 Jul 1999 17:52:47 -0700 Message-ID: <379FA436.631803B3@home.com> Date: Wed, 28 Jul 1999 20:45:42 -0400 From: Byron Nikolaidis Organization: @Home Network X-Mailer: Mozilla 4.5 [en]C-AtHome0405 (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: kalma@polsl.gliwice.pl CC: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Cursors and move References: <19990728211246.A1996@polsl.gliwice.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Marcin Kadziolka wrote: > > Hi All! > > First of all, I'm not sure if it is on-topic here. If not, show a correct > place to me, please. > > I've got some problems with cursors and move command. > I write a program using libpq and I have something like this: > > BEGIN > DECLARE cur CURSOR FOR SELECT num FROM zlec > FETCH FORWARD 2 IN cur > MOVE BACKWARD ALL IN cur > FETCH FORWARD 2 IN cur > > In the last FETCH command PQresultStatus(res) returns PGRES_TUPLES_OK, but > PQntuples(res) returns 0. > Is it a correct behaviour of the move command? Or I missed something? > The cursors have never really worked right. Especially the move seems wrong, once you go off the edge, you're screwed. Dave Hartwig was close to a fix for this at one point, but he gave up. Byron