Re: move 0 behaviour
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Dave Cramer <dave@fastcrypt.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2002-10-30T18:19:27Z
Lists: pgsql-hackers, pgsql-general
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