Re: LIMIT NULL

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LIMIT NULL
Date: 2009-02-02 18:03:34
Message-ID: 603c8f070902021003k19a79114vdcd23fe0577d0657@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 2, 2009 at 12:58 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> David E. Wheeler wrote:
>> Howdy,
>>
>> Is it intentional that `LIMIT NULL` means the same as `LIMIT ALL`? If
>> so, I'd like to submit a patch to document it, because I've found it
>> useful in SQL functions:
>>
>> http://justatheory.com/computers/databases/postgresql/dynamic-limit.html
>
> Uh, I figure LIMIT NULL should return no rows.

Wouldn't that be LIMIT 0? Per SQL spec, doesn't NULL refer to an
unknown quantity? Making it mean ALL seems more useful than making it
mean 0, since you can already write 0 if you want 0.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-02-02 18:04:11 Re: LIMIT NULL
Previous Message Bruce Momjian 2009-02-02 17:58:21 Re: LIMIT NULL