Re: CURSOR after hitting end - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: CURSOR after hitting end
Date
Msg-id 200004042004.QAA29446@candle.pha.pa.us
Whole thread Raw
In response to Re: CURSOR after hitting end  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: CURSOR after hitting end  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Re: CURSOR after hitting end  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
> Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CURSOR after hitting end
Next
From: Tom Lane
Date:
Subject: Re: postgres crash on CURSORS