Eric McKeeth <eldin00(at)gmail(dot)com> writes:
> why would I get the following error, since the period() function is in fact
> declared as immutable?
> test=# ALTER TABLE test3 ADD exclude using
> gist(period(effect_date::timestamptz, expire_date::timestamptz) with && );
> ERROR: functions in index expression must be marked IMMUTABLE
period() might be immutable, but those casts from date to timestamptz
are not, because they depend on the TimeZone parameter.
regards, tom lane