Re: Trouble with pg_dumpall import with 7.2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Trouble with pg_dumpall import with 7.2
Date
Msg-id 134.1014217146@sss.pgh.pa.us
Whole thread Raw
In response to Re: Trouble with pg_dumpall import with 7.2  (Hervé Piedvache <herve@elma.fr>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SET NULL / SET NOT NULL
Next
From: Jean-Michel POURE
Date:
Subject: Re: UTF-8 data migration problem in Postgresql 7.2