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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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