> On Jul 23, 2018, at 12:20, Mads Jensen <m...@inducks.org> wrote: > > Q(published__gt=datetime.date(2017, 10, 1)) > => > "table"."published" > '2017-10-01'::timestamp; > > is unfortunate because it turns the function mutable, and the index can > therefore not be created (exact error message can be seen in the Jenkins > output).
I think the issue is that you are mixing TIMESTAMP and TIMESTAMPTZ here xof=# create table i (p timestamptz); CREATE TABLE xof=# create index on i(p) where p > '2011-01-01'::timestamp; ERROR: functions in index predicate must be marked IMMUTABLE xof=# create index on i(p) where p > '2011-01-01'::timestamptz; CREATE INDEX xof=# create table i (p timestamp); CREATE TABLE xof=# create index on i(p) where p > '2011-01-01'::timestamptz; ERROR: functions in index predicate must be marked IMMUTABLE xof=# create index on i(p) where p > '2011-01-01'::timestamp; CREATE INDEX -- -- Christophe Pettus x...@thebuild.com -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C136730A-1C63-47FB-8B24-C1800EC8C778%40thebuild.com. For more options, visit https://groups.google.com/d/optout.