| От | Tom Lane |
|---|---|
| Тема | Re: Help on indexing timestamps |
| Дата | |
| Msg-id | 17309.1047308852@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Help on indexing timestamps (Andre Schubert <andre@km3.de>) |
| Список | pgsql-sql |
Andre Schubert <andre@km3.de> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Update to 7.3, and that problem will go away.
>>
> What is the difference between 7.2 and 7.3 related to my problem ?
7.3 is willing to index comparisons to now(), that's what ;-)
You may care to study the difference between cachable/noncachable
functions in 7.2, versus the difference between
immutable/stable/volatile functions in 7.3. 7.2 has to treat now()
as noncachable and therefore unsafe to index. 7.3 treats it as
stable and therefore safe to index.
You can work around this in 7.2 by cheating with subselects or wrapper
functions, but that's a poor substitute for a real solution.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера