Re: Help on indexing timestamps

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Cursors and backwards scans and SCROLL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimizing view