pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedCursors and move
2+ messages / 2 participants
[nested] [flat]
* Cursors and move
@ 1999-07-28 19:12 Marcin Kadziolka <kalma@polsl.gliwice.pl>
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Kadziolka @ 1999-07-28 19:12 UTC (permalink / raw)
To: pgsql-interfaces
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?
--
Na razie | Zapraszam na: http://www.polsl.gliwice.pl/~kalma
Marcin |
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] Cursors and move
@ 1999-07-29 00:45 Byron Nikolaidis <byron.nikolaidis@home.com>
parent: Marcin Kadziolka <kalma@polsl.gliwice.pl>
0 siblings, 0 replies; 2+ messages in thread
From: Byron Nikolaidis @ 1999-07-29 00:45 UTC (permalink / raw)
To: kalma@polsl.gliwice.pl; +Cc: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-07-29 00:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-28 19:12 Cursors and move Marcin Kadziolka <kalma@polsl.gliwice.pl>
1999-07-29 00:45 ` Byron Nikolaidis <byron.nikolaidis@home.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox