Re: Behavior of "OFFSET -1"

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Behavior of "OFFSET -1"
Date: 2014-07-22 17:35:45
Message-ID: 20140722173545.GA8277@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 22, 2014 at 12:49:37PM -0400, Tom Lane wrote:
> Before 9.3, you got an error from this:
>
> regression=# select * from tenk1 offset -1;
> ERROR: OFFSET must not be negative

That seems eminently sane, and should continue to error out, IM.

The only circumstance I can imagine where this could be argued not to
be is just casuistry, namely LIMIT m OFFSET -n might be argued to mean
LIMIT m-n.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2014-07-22 18:01:52 Re: parametric block size?
Previous Message Robert Haas 2014-07-22 17:26:35 Re: Behavior of "OFFSET -1"