Re: date_trunc on date is immutable?

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: date_trunc on date is immutable?
Дата
Msg-id dcc563d10912241656t61c23a63s1c4c7de71e67facf@mail.gmail.com
обсуждение исходный текст
Ответ на date_trunc on date is immutable?  (Kian Wright <kian.wright@senioreducators.com>)
Ответы Re: date_trunc on date is immutable?  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
On Thu, Dec 24, 2009 at 4:36 PM, Kian Wright
<kian.wright@senioreducators.com> wrote:
> I'm trying to create an index on the month and year of a date field (in
> 8.3), and I'm getting the "functions in index expression must be marked
> IMMUTABLE" error message.

If applied to a timestamp, it is immutable.  If it's a timestamp with
timezone it's not, because the timezone can change, which would change
the index.

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

Предыдущее
От: Kian Wright
Дата:
Сообщение: date_trunc on date is immutable?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: How to add month.year column validation