Re: LIMIT NULL

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: LIMIT NULL
Дата
Msg-id 70A4F459-E2F8-44CA-8229-7FC3FB85E977@kineticode.com
обсуждение исходный текст
Ответ на Re: LIMIT NULL  (Bruce Momjian <bruce@momjian.us>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: LIMIT NULL
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: LIMIT NULL