Fix LIMIT/OFFSET for null limit values. This worked before 8.2 but was broken

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

Commit: 7f676624f67f4b8590ec70f9e17f7e16e614e92e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-12-03T21:40:13Z
Releases: 8.2.1
Fix LIMIT/OFFSET for null limit values.  This worked before 8.2 but was broken
by the change to make limit values int8 instead of int4.  (Specifically, you
can do DatumGetInt32 safely on a null value, but not DatumGetInt64.)  Per
bug #2803 from Greg Johnson.

Files

PathChange+/−
src/backend/executor/nodeLimit.c modified +26 −16