Re: date is not immutable ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: date is not immutable ?
Дата
Msg-id 29517.1047505618@sss.pgh.pa.us
обсуждение исходный текст
Ответ на date is not immutable ?  ("Gaetano Mendola" <mendola@bigfoot.com>)
Список pgsql-admin
"Gaetano Mendola" <mendola@bigfoot.com> writes:
> I'm trying to create an index on a timestamptz field just extracting the
> date:
> # create index idx_user_logs_login_time_date on user_logs (
> date(login_time) );
> ERROR:  DefineIndex: index function must be marked IMMUTABLE

> why date is not marked immutable ?

Because the conversion depends on your timezone setting.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: OOT-Does PostgreSQL has commercial level.
Следующее
От: P G
Дата:
Сообщение: I cannot get the db to initialize. Please help.