Re: Negative offsets

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Negative offsets
Дата
Msg-id 200512170014.jBH0EgJ21747@candle.pha.pa.us
обсуждение исходный текст
Ответ на Negative offsets  (CSN <cool_screen_name90001@yahoo.com>)
Ответы Re: Negative offsets  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: Negative offsets  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
CSN wrote:
> I was playing around with negative offsets:
>
> select * from table1 order by col1 offset -5 limit 25;
> select * from table1 order by col1 offset -25 limit
> 25;
> select * from table1 order by col1 offset -250 limit
> 25;
>
> They all return the same resultset (offset 0). Is
> there even any point in allowing negative offsets -
> such as maybe someday they'll offset backwards?

Actually we allow negative offsets and limits.  Seems we should disallow
them.  Yes, it would be interesting if they did offsets relative to the
end of the result set.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Versioning Schema/Stored Procedures
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Negative offsets