| От | Tom Lane |
|---|---|
| Тема | Re: Forcing query to use an index |
| Дата | |
| Msg-id | 8864.1046817200@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Forcing query to use an index (Greg Stark <gsstark@mit.edu>) |
| Список | pgsql-sql |
Greg Stark <gsstark@MIT.EDU> writes:
> I admit using 9999-01-01 as a date gives me the willies. But it does match
> with the way the field is used and it produces nice clean index range
> lookups.
If you're willing to switch to type 'timestamp' then you could use the
special value 'infinity' (or '-infinity' when you need it to sort before
instead of after normal times).
There was some talk awhile back of making type 'date' support infinity
as well. This'd cost one day at each end of the allowable range, which
doesn't seem like a big loss. But no one's done the legwork.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера