Possible bug in date(timestamptz)?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Possible bug in date(timestamptz)?
Дата
Msg-id 200303271507.44587.dev@archonet.com
обсуждение исходный текст
Ответы Re: Possible bug in date(timestamptz)?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I can create a functional index on date(timestamp) but not date(timestamptz).
Version 7.3.2

=> CREATE TABLE foo (ts_with timestamp with time zone,
  ts_without timestamp without time zone);
CREATE TABLE
=> CREATE INDEX foo1_idx ON foo ( date(ts_with) );
ERROR:  DefineIndex: index function must be marked IMMUTABLE
=> CREATE INDEX foo2_idx ON foo ( date(ts_without) );
CREATE INDEX

I can't think why one would be immutable and the other not, so I updated
pg_proc setting provolatile='i' for the function in question. All seems OK.

I haven't got the source to hand - can anyone verify this isn't an RPM glitch
(seems unlikely)?

Can any developers confirm that switching the flag is safe (can't think why
not)?

--
  Richard Huxton


В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Earth distance
Следующее
От: "Loki"
Дата:
Сообщение: PostgreSQL + IDS load/latency help