Re: Exclusion constraints with time expressions

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: <hari(dot)fuchs(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Exclusion constraints with time expressions
Date: 2012-11-06 14:17:48
Message-ID: D960CB61B694CF459DCFB4B0128514C208A4EACB@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hari(dot)fuchs(at)gmail(dot)com wrote:
> > I think the problem is that this + operator is implemented
> > by the function "timestamptz_pl_interval", which is STABLE
> > but not IMMUTABLE.
> >
> > I am not sure why this function cannot be IMMUTABLE, it
> > seems to me that it should be.
>
> No: the result of e.g.
>
> SELECT TIMESTAMPTZ '2012-10-28 01:30:00' + INTERVAL '24 hours';
>
> depends on the client's timezone and its DST rules.

You are right; timestamptz_in itself is STABLE, and I forgot
about daylight savings time.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2012-11-06 14:37:29 Re: Exclusion constraints with time expressions
Previous Message Kevin Grittner 2012-11-06 13:58:14 Re: Exclusion constraints with time expressions