From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Eric McKeeth <eldin00(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclusion constraint issue |
Date: | 2010-09-26 14:02:34 |
Message-ID: | 20100926140234.GC22240@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Sep 24, 2010 at 05:22:15PM -0400, Tom Lane wrote:
> 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.
How hard would it be to point out the first expression found to be
mutable? All of them?
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-09-26 14:04:42 | Re: "IN" in a geometric database using data type "point" |
Previous Message | David Fetter | 2010-09-26 13:59:41 | Re: How to dump only the the data without schema? |