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

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: serg(at)gate(dot)informika(dot)ru (Sergey E(dot) Levov)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Re: [BUGS] bug in "fetch" command?
Date: 1998-08-22 02:32:23
Message-ID: 199808220232.WAA03377@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Can someone comment on this? Is is a bug?

> ============================================================================
> POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
>
>
> Your name : Sergey E. Levov
> Your email address : serg(at)informika(dot)ru
>
>
> System Configuration
> ---------------------
> Architecture (example: Intel Pentium) : Intel Pentium Pro
>
> Operating System (example: Linux 2.0.26 ELF) : FreeBSD 2.2.5
>
> PostgreSQL version (example: PostgreSQL-6.3.2) : PostgreSQL-6.3.2
>
> Compiler used (example: gcc 2.7.2) : gcc 2.7.2.1
>
>
> 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.
>
>
>
> Please describe a way to repeat the problem. Please try to provide a
> concise reproducible example, if at all possible:
> ----------------------------------------------------------------------
> 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
>
>
> Regards,
> Sergey Levov (serg(at)informika(dot)ru)
>
>
>
>

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-08-22 02:32:52 Re: [HACKERS] Segmentation fault with lo_export
Previous Message Thomas G. Lockhart 1998-08-22 01:52:00 Re: [HACKERS] Re: PostgreSQL + year 2000