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

Re: [HACKERS] Re: [BUGS] bug in "fetch" command?

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Sergey E(dot) Levov" <serg(at)gate(dot)informika(dot)ru>, PostgreSQL-development <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: [BUGS] bug in "fetch" command?
Date: 1998-10-03 15:47:00
Message-ID: 361646F4.A2E4245E@alumni.caltech.edu (view raw or flat)
Thread:
Lists: pgsql-hackers
> Can someone comment on this?  Is is a bug?

I was a bit suprised to see this behavior. I am guessing that it is a
bug. Does anyone else think so? I last tested and noticed this a week or
two ago when writing docs...

                  - Tom

> > Please enter a FULL description of your problem:
> > ------------------------------------------------
> > When I declare cursor for select statement without "ORDER BY" clause
> > ( select * from <tablename> ), and then attempt to fetch record 
> > after last record in table, or even just give "fetch all" command,
> > all the following "fetch" commands, regardless direction, will 
> > return an empty result sets.
> > If "SELECT" statement has "ORDER BY" clause, all works well.
> > Try the following sequence of SQL operators:
> >
> > begin
> > declare mycurs cursor for select * from pg_user
> > fetch all in mycurs             - OK
> > fetch backward all in mycurs  - fails
> > move backward all in mycurs
> > fetch all in mycurs           - fails
> > close mycurs
> >
> > declare mycurs cursor for select * from pg_user order by usename
> > fetch all in mycurs           - OK
> > fetch backward all in mycurs  - OK
> > move backward all in mycurs
> > fetch all in mycurs           - OK

In response to

pgsql-hackers by date

Next:From: Thomas G. LockhartDate: 1998-10-03 18:58:04
Subject: need help with csh
Previous:From: Bruce MomjianDate: 1998-10-03 14:54:15
Subject: Re: [COMMITTERS] 'pgsql/doc README.ipaddr'

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