Re: [GENERAL] type cast in index

2009-06-09 Thread Linos
Yes it seems you have reason Chris, i have been using 'timestamp with time zone' without need it because i have read in the mailing list was good practice because maybe one day you use the database in more timezones but i ever use the app in the same timezone so i will convert the column datatyp

Re: [GENERAL] type cast in index

2009-06-09 Thread Tom Lane
"Chris Spotts" writes: >> 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 > If your time_stamp

Re: [GENERAL] type cast in index

2009-06-09 Thread Alvaro Herrera
Linos escribió: > 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 You can make it work by adding an AT TIME ZONE 'U

Re: [GENERAL] type cast in index

2009-06-09 Thread Chris Spotts
>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 If your time_stamp_creacion is a timestamp with time

[GENERAL] type cast in index

2009-06-09 Thread Linos
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 vers