Re: Trouble with pg_dumpall import with 7.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: herve(at)elma(dot)fr
Cc: Masaru Sugawara <rk73(at)echna(dot)ne(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trouble with pg_dumpall import with 7.2
Date: 2002-02-20 14:59:06
Message-ID: 134.1014217146@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?iso-8859-1?Q?Herv=E9?= Piedvache <herve(at)elma(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-02-20 15:07:11 pg_type defaults
Previous Message Tom Lane 2002-02-20 14:53:29 Re: SET NULL / SET NOT NULL