Behavior of negative OFFSET

From: Robert James <srobertjames(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Behavior of negative OFFSET
Date: 2011-11-07 21:47:20
Message-ID: CAGYyBggx9_ajO3L5Lmr-6rNK238J+zZdxL=QFEarjTG17cRTtg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've been using a query on Postgres 8.4 with a negative OFFSET, which
works fine:

SELECT DISTINCT s.* FROM s WHERE ... ORDER BY s.bday ASC, s.name
ASC LIMIT 15 OFFSET -15

When I run the same query on Postgres 9.1, I get an error:
ERROR: OFFSET must not be negative

Question:
1. Was this changed in a version of Postgres? Is this configurable?
2. How do I get the original behavior of negative offsets?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-11-07 22:04:40 Re: Behavior of negative OFFSET
Previous Message pasman pasmański 2011-11-07 20:13:58 Www emulator