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

Re: Scroll cursor oddity...

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Mike Aubury" <mike(dot)aubury(at)aubit(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Scroll cursor oddity...
Date: 2008-04-01 19:20:51
Message-ID: 87hcel5qlo.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Mike Aubury <mike(dot)aubury(at)aubit(dot)com> writes:
>> ie - under postgresql it appears we've scrolled *past* the last row and need 
>> an additional fetch to get back to our last row..
>
> Why do you find that surprising?  It seems to me to be symmetrical with
> the case at the beginning of the table --- the cursor is initially
> positioned before the first row.  Why shouldn't there be a corresponding
> state where it's positioned after the last row?

What's implied by that but perhaps not clear is that it's easier to think of
cursors as being *between* rows rather than *on* rows. I'm not sure the
standard entirely adopts that model however. 

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's PostGIS support!

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-04-01 20:37:00
Subject: Lots and lots of strdup's (bug #4079)
Previous:From: Gregory StarkDate: 2008-04-01 19:18:18
Subject: Re: ANALYZE getting dead tuple count hopelessly wrong

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