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