Re: [HACKERS] [ADMIN] cast not IMMUTABLE?

2004-05-06 Thread Christopher Kings-Lynne
(login_time at time zone 'GMT')::date but upon experimenting I see that that isn't considered immutable either :-(. Offhand I think this may be an oversight --- I can't see any reason for the various flavors of AT TIME ZONE (a/k/a timezone() function) not to be considered immutable.

Re: [HACKERS] [ADMIN] cast not IMMUTABLE?

2004-05-06 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] writes: consider that login_time is a TIMESTAMPTZ with an index on it. test# create index idx on user_logs ( (login_time::date) ); ERROR: functions in index expression must be marked IMMUTABLE why that cast is not considered IMMUTABLE ? Because it depends