Re: date index problems

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: date index problems
Дата
Msg-id 10218.1048225589@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: date index problems  (Gavin Sherry <swm@linuxworld.com.au>)
Список pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> I presume the type of plan_next is 'date'. Does casting '2003-01-01'::date
> - interval '1 week' to date help?

Easier would be'2003-01-01'::date - 7
which yields a date to start with.  But yeah, date minus interval yields
a timestamp, which will not automatically downconvert to a date, thus
you don't get to use an index on date.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: probs with postgres
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: probs with postgres