Re: Exclusion constraints with time expressions - Mailing list pgsql-general

From Tom Lane
Subject Re: Exclusion constraints with time expressions
Date
Msg-id 13675.1352216612@sss.pgh.pa.us
Whole thread Raw
In response to Re: Exclusion constraints with time expressions  ("Kevin Grittner" <kgrittn@mail.com>)
List pgsql-general
"Kevin Grittner" <kgrittn@mail.com> writes:
> Now, if you wanted to argue that *this* query might depend on time
> zone information, I'd be more willing to believe it, and maybe the
> problem is that we use the same function for both:

> SELECT TIMESTAMPTZ '2012-10-28 01:30:00' + INTERVAL '1 day';

The "problem" is not with the function, but with the fact that both
kinds of interval are the same data type.  That's not something we have
the flexibility to change AFAICS.

It should be possible to use the protransform feature to allow
argument-value-dependent const folding, if anyone is annoyed enough
about this specific case to write some code for it.

            regards, tom lane


pgsql-general by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Exclusion constraints with time expressions
Next
From: Jeff Janes
Date:
Subject: Re: Question about "ident_file" in postgres.conf