Re: [HACKERS] Re: [BUGS] bug in "fetch" command?
От | Thomas G. Lockhart |
---|---|
Тема | Re: [HACKERS] Re: [BUGS] bug in "fetch" command? |
Дата | |
Msg-id | 361646F4.A2E4245E@alumni.caltech.edu обсуждение исходный текст |
Ответ на | Re: [BUGS] bug in "fetch" command? (Bruce Momjian <maillist@candle.pha.pa.us>) |
Список | 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
В списке pgsql-hackers по дате отправления: