• Tom Lane's avatar
    Re-enable error for "SELECT ... OFFSET -1". · 27048980
    Tom Lane authored
    The executor has thrown errors for negative OFFSET values since 8.4 (see
    commit bfce56ee), but in a moment of brain
    fade I taught the planner that OFFSET with a constant negative value was a
    no-op (commit 1a1832eb).  Reinstate the
    former behavior by only discarding OFFSET with a value of exactly 0.  In
    passing, adjust a planner comment that referenced the ancient behavior.
    
    Back-patch to 9.3 where the mistake was introduced.
    27048980
planner.c 119 KB