Re: Timestamp-based indexing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Timestamp-based indexing
Дата
Msg-id 10061.1090878007@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Timestamp-based indexing  (Litao Wu <litaowu@yahoo.com>)
Ответы Re: Timestamp-based indexing  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-performance
Litao Wu <litaowu@yahoo.com> writes:
> How about changing:

> CURRENT_TIMESTAMP - INTERVAL '10 minutes'
> to
> 'now'::timestamptz - INTERVAL '10 minutes'

> It seems to me that Postgres will treat it as
> a constant.

Yeah, that works too, though again it might burn you if used inside a
function or prepared statement.  What you're doing here is to push the
freezing of the "now" value even further upstream, namely to initial
parsing of the command.

            regards, tom lane

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

Предыдущее
От: Litao Wu
Дата:
Сообщение: Re: Timestamp-based indexing
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Timestamp-based indexing