Re: Bug in move 0 - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Bug in move 0
Date
Msg-id 200006110348.XAA16727@candle.pha.pa.us
Whole thread Raw
In response to Re: Bug in move 0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > If I remember correctly *move 0* means *move all* in the
> > implementation of cursor.
>
> It does (I looked at it before).
>
> > I don't know if it's the spec or not.
>
> As best I can tell from SQL92, FETCH RELATIVE 0 implies no movement
> (refetch same row).  MOVE is not in the spec but it seems it ought
> to behave like that too.
>
> The fix seemed too extensive to be making in the last days of 7.0
> beta, so I let it go at the time --- but someone should fix this.
>

I just sent off an email stating that MOVE 0 goes to the end, and that
the FETCH manual page says:

              SQL92 allows one to repetatively retrieve the  cur-
              sor at its "current position" using the syntax

              FETCH RELATIVE 0 FROM cursor



              Postgres does not currently support this notion; in
              fact the value zero is reserved  to  indicate  that
              all  rows  should be retrieved and is equivalent to
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              specifying the ALL keyword.  If the  RELATIVE  key-
              word  has  been used, the Postgres assumes that the
              user intended SQL92 behavior and returns this error
              message.

So it seems we are OK.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug in move 0
Next
From: Tom Lane
Date:
Subject: Re: Bug in move 0