Re: BUG #13608: 3 argument range constructor functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: robert(dot)kruus(at)gov(dot)sk(dot)ca
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13608: 3 argument range constructor functions
Date: 2015-09-02 23:29:09
Message-ID: 21535.1441236549@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

robert(dot)kruus(at)gov(dot)sk(dot)ca writes:
> The int4range, int8range, daterange functions seem to be ignoring the 3rd
> argument which specifies the interval bounds.
> i.e.
> SELECT daterange('2010-01-01'::date, '2011-01-01'::date, '()'::text);
> daterange
> -------------------------
> [2010-01-02,2011-01-02)

It's not ignoring it. What it's doing is canonicalizing the range so that
equivalent ranges actually look the same. Note your bounds have changed.
(BTW, you misquoted the result; the upper date does not change in this
case, at least not for me.)

See the discussion of discrete vs continuous range types at

http://www.postgresql.org/docs/9.3/static/rangetypes.html#RANGETYPES-DISCRETE

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-09-02 23:33:00 Re: BUG #13440: unaccent does not remove all diacritics
Previous Message Andres Freund 2015-09-02 23:27:47 Re: BUG #13440: unaccent does not remove all diacritics