Negative LIMIT and OFFSET?

Поиск
Список
Период
Сортировка
Искать
От
Simon Riggs
Тема
Negative LIMIT and OFFSET?
Дата
Msg-id
1197595141.15521.10.camel@ebony.site
Список
Дерево обсуждения
Negative LIMIT and OFFSET? Simon Riggs <simon@2ndquadrant.com>
Re: Negative LIMIT and OFFSET? Gregory Stark <stark@enterprisedb.com>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Neil Conway <neilc@samurai.com>
Re: Negative LIMIT and OFFSET? Simon Riggs <simon@2ndquadrant.com>
Re: Negative LIMIT and OFFSET? Simon Riggs <simon@2ndquadrant.com>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Simon Riggs <simon@2ndquadrant.com>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? Bruce Momjian <bruce@momjian.us>
Re: Negative LIMIT and OFFSET? "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Negative LIMIT and OFFSET? Gregory Stark <stark@enterprisedb.com>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Gregory Stark <stark@enterprisedb.com>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Simon Riggs <simon@2ndquadrant.com>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Gregory Stark <stark@enterprisedb.com>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? "Merlin Moncure" <mmoncure@gmail.com>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? "Jonah H. Harris" <jonah.harris@gmail.com>
Re: Negative LIMIT and OFFSET? Andrew Sullivan <ajs@crankycanuck.ca>
Re: Negative LIMIT and OFFSET? Bruce Momjian <bruce@momjian.us>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
Re: Negative LIMIT and OFFSET? Gregory Stark <stark@enterprisedb.com>
Re: Negative LIMIT and OFFSET? Tom Lane <tgl@sss.pgh.pa.us>
I'm fairly surprised these queries work. Is there some reason why we
support this? April Fools Day? Jules Verne? I'm all for fast queries,
but zero seems like the lowest value we should support...

postgres=# select * from accounts limit -9;aid | bid | abalance | filler 
-----+-----+----------+--------
(0 rows)

Time: 0.330 ms
postgres=# select * from accounts limit -9 offset 45;aid | bid | abalance | filler 
-----+-----+----------+--------
(0 rows)

Time: 0.268 ms
postgres=# select * from accounts limit -9 offset -100000;aid | bid | abalance | filler 
-----+-----+----------+--------
(0 rows)

Time: 0.287 ms

postgres=# select * from accounts limit 0 offset -100000;aid | bid | abalance | filler 
-----+-----+----------+--------
(0 rows)

Time: 0.289 ms

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com


В списке pgsql-hackers по дате отправления
От: Gregory Stark
Дата:
От: Gregory Stark
Дата:
Сообщение: Re: Negative LIMIT and OFFSET?
FAQ