Re: [GENERAL] expression index on date_trunc

2008-01-31 Thread a . redhead
><[EMAIL PROTECTED]> writes: >> CREATE INDEX request_day_idx ON moksha_sm_request >(date_trunc('day', >request_received)); >... >> I'd be grateful if someone could point out what part of the statement >is not >> IMMUTABLE or how I could mark my create index statement as being >immutable. >date

Re: [GENERAL] expression index on date_trunc

2008-01-30 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > CREATE INDEX request_day_idx ON moksha_sm_request (date_trunc('day', > request_received)); ... > I'd be grateful if someone could point out what part of the statement is not > IMMUTABLE or how I could mark my create index statement as being immutable. date_trunc(t

Re: [GENERAL] expression index on date_trunc

2008-01-30 Thread Daniel Verite
A Redhead wrote: CREATE INDEX request_day_idx ON moksha_sm_request (date_trunc('day', request_received)); I get the error message: ERROR: functions in index expression must be marked IMMUTABLE [...] I'd be grateful if someone could point out what part of the statement is not I

[GENERAL] expression index on date_trunc

2008-01-30 Thread a . redhead
Hi, is is possible to create an expression index based on the date_trunc function? Working with PostgreSQL 8.2, I'm trying to create an index using: CREATE INDEX request_day_idx ON moksha_sm_request (date_trunc('day', request_received)); I get the error message: ERROR: functions in index