Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group