Re: move 0 behaviour

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To:
Cc: Peter Eisentraut <peter_e@gmx.net>, Dave Cramer <dave@fastcrypt.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2002-10-31T05:16:47Z
Lists: pgsql-hackers, pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The following patch makes FETCH/MOVE 0 do nothing, and FETCH LAST move
> to the end.

Do not hack up PerformPortalFetch; put the special case for INT_MAX in
utility.c's FetchStmt code, instead.  As-is, you probably broke other
callers of PerformPortalFetch.

BTW, there's a comment in parsenodes.h that needs to be fixed too:

    int            howMany;        /* amount to fetch ("ALL" --> 0) */

			regards, tom lane