Re: move 0 behaviour - Mailing list pgsql-hackers

From Tom Lane
Subject Re: move 0 behaviour
Date
Msg-id 213.1036001967@sss.pgh.pa.us
Whole thread Raw
In response to Re: move 0 behaviour  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I did some research on this.  It turns out the parser uses 0 for ALL, so
> when you do a FETCH ALL it is passing zero.  Now, when you do MOVE 0,
> you are really asking for FETCH ALL and all the tuples are thrown away
> because of the MOVE.

Yeah.  I think this is a bug and "MOVE 0" ought to be a no-op ... but
changing it requires a different parsetree representation for MOVE ALL,
which is tedious enough that it hasn't gotten done yet.

> I have the following patch which just documents the fact that MOVE 0
> goes to the end of the cursor.  It does not change any behavior, just
> document it.

It should be documented as behavior that is likely to change.  Also,
I believe FETCH 0 has the same issue.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Olivier PRENANT
Date:
Subject: Re: 7.3b3 ok on unixware 71[12] here
Next
From: Peter Eisentraut
Date:
Subject: Re: float output precision questions