type cast in index

Поиск
Список
Период
Сортировка
От Linos
Тема type cast in index
Дата
Msg-id 4A2E8BC5.8080902@linos.es
обсуждение исходный текст
Ответы Re: type cast in index  ("Chris Spotts" <rfusca@gmail.com>)
Re: type cast in index  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Hello,
    i have reading in the mailing list any messages where different people use this
format to establish a functional index in a column using a type cast.

CREATE INDEX fecha_creacion_ordtrab ON orden_trabajo_cabecera USING btree
((time_stamp_creacion::date));

but in my postgresql 8.3 version i get this error:

ERROR:  functions in index expression must be marked IMMUTABLE

I have tried with the typical CAST too but i get the same error, the column in
the table is:

                Column          |           Type                        |
Modifiers
time_stamp_creacion     | timestamp with time zone | default now()

What can be the problem? Thanks.

Regards,
Miguel Angel.

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

Предыдущее
От: Vick Khera
Дата:
Сообщение: Re: postgres getting slow under heavy load though autivacuum is enabled
Следующее
От: "Octavio Alvarez"
Дата:
Сообщение: Re: limit table to one row