Re: LIMIT NULL - Mailing list pgsql-hackers

From Robert Haas
Subject Re: LIMIT NULL
Date
Msg-id 603c8f070902021003k19a79114vdcd23fe0577d0657@mail.gmail.com
Whole thread Raw
In response to Re: LIMIT NULL  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Mon, Feb 2, 2009 at 12:58 PM, Bruce Momjian <bruce@momjian.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: LIMIT NULL
Next
From: "David E. Wheeler"
Date:
Subject: Re: LIMIT NULL