Search Postgresql Archives

Re: ERROR: functions in index expression must be marked IMMUTABLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 February 2017 at 10:09, Sven R. Kunze <srkunze@xxxxxxx> wrote:
>>># create index docs_birthdate_idx ON docs using btree (((meta->>'birthdate')::date));
ERROR:  functions in index _expression_ must be marked IMMUTABLE

So, what is the problem here?

​Date functions are inherently not immutable because of timezones. Your solution of using to_timestamp doesn't help because it automatically returns a value in WITH TIMESTAMP. Do you get anywhere by using "::timestamp without time zone" instead, as suggested here?


Geoff


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux