Re: calculated expressions and index use

Поиск
Список
Период
Сортировка
От Pavel Hlavnicka
Тема Re: calculated expressions and index use
Дата
Msg-id 3E3A3757.3040906@gingerall.cz
обсуждение исходный текст
Ответ на Re: calculated expressions and index use  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: calculated expressions and index use
Список pgsql-sql
I use 7.2.1. :(

Do you thing my considerations on constant vs. expression are correct? I 
tried different syntax, no success.

Thanks

Pavel

Tom Lane wrote:
> Pavel Hlavnicka <pavel@gingerall.cz> writes:
> 
>>select * from foo
>>where created_at >= 'now'::timestamp - '1 hour'::interval;
> 
> 
>>My table is indexed on created_at field. The query above doesn't use it, 
> 
> 
> What's your PG version?  In 7.2 and later that expression will be folded
> to a constant.
> 
>             regards, tom lane

-- 
Pavel Hlavnicka
Ginger Alliance
www.gingerall.com



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: checking data integrity in a recursive table
Следующее
От: "David Durst"
Дата:
Сообщение: Postgres MD5 Function