Hervé Piedvache <herve@elma.fr> writes:
> OK it's a bug of postgreSQL 7.2 ??
> I can apply an index on the field datelog where this field is a
> timestamp like :
> create index ix_datelog_date on datelog (date(datelog);
> ERROR: DefineIndex: index function must be marked iscachable
It's not a bug, and it'd not be wise of you to override the decision to
mark date(timestamp) noncachable. The reason it's marked that way is
that timestamp-to-date conversion depends on the TimeZone setting,
not only on the input argument.
If you make a functional index as above, it will misbehave as soon as
you have users with different timezone settings.
regards, tom lane