Re: LIMIT NULL

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LIMIT NULL
Date: 2009-02-02 18:04:11
Message-ID: 70A4F459-E2F8-44CA-8229-7FC3FB85E977@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Feb 2, 2009, at 9:58 AM, Bruce Momjian wrote:

>> 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.

Well, LIMIT 0 does that, and it's useful to have a type-compatible
option to LIMIT that allows it to return all rows. And I say type-
compatible, because you can't pass "ALL" as a bare string via a
function like COALESCE.

Best,

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-02-02 18:09:28 Re: LIMIT NULL
Previous Message Robert Haas 2009-02-02 18:03:34 Re: LIMIT NULL