| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера