Re: Exclusion constraints with time expressions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <kgrittn(at)mail(dot)com>
Cc: hari(dot)fuchs(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Exclusion constraints with time expressions
Date: 2012-11-06 15:43:32
Message-ID: 13675.1352216612@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Kevin Grittner" <kgrittn(at)mail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2012-11-06 16:25:05 Re: Question about "ident_file" in postgres.conf
Previous Message Kevin Grittner 2012-11-06 15:05:51 Re: Tuning / performance questions