Re: CURSOR after hitting end

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: CURSOR after hitting end
Date: 2000-04-04 20:04:50
Message-ID: 200004042004.QAA29446@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > We have this in the CURSOR documentation:
> > Once all rows are fetched, every other fetch access
> > returns no rows.
>
> > Is this still true?
>
> Not if you then move or fetch backwards, I should think...

No, it works. I think Tatsuo fixed it. After a FETCH ALL, I did this,
and it worked:

test=> fetch -1 from bigtable_cursor;
customer_id
-------------
1000
(1 row)

test=> fetch -1 from bigtable_cursor;
customer_id
-------------
999
(1 row)

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-04-04 20:06:27 Re: postgres crash on CURSORS
Previous Message Tom Lane 2000-04-04 19:59:32 Re: CURSOR after hitting end