Re: 9.2 Beta: intersection of daterange - Mailing list pgsql-hackers

From Misa Simic
Subject Re: 9.2 Beta: intersection of daterange
Date
Msg-id 7137589199374978896@unknownmsgid
Whole thread Raw
In response to 9.2 Beta: intersection of daterange  (Brar Piening <brar@gmx.de>)
Responses Re: 9.2 Beta: intersection of daterange
List pgsql-hackers
I think result is ok... 2010-01-04 is not inside first range...

Sent from my Windows Phone
From: Brar Piening
Sent: 16/05/2012 09:53
To: pgsql-hackers
Subject: [HACKERS] 9.2 Beta: intersection of daterange
I'm currently doing some tests on range types:

tests=# SELECT int8range(5,15) * int8range(10,20) AS intersection;
  intersection
--------------
  [10,15)
(1 Zeile)


tests=#
tests=# SELECT '[2010-03-15,2010-05-22)'::daterange *
'[2010-01-04,)'::daterange AS intersection;
       intersection
-------------------------
  [2010-03-15,2010-05-22)
(1 Zeile)


Does the second query trigger a bug or am I misunderstanding something?

I would expect [2010-01-04,2010-05-22) as result.

Regards,

Brar

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Brar Piening
Date:
Subject: 9.2 Beta: intersection of daterange
Next
From: Brar Piening
Date:
Subject: Re: 9.2 Beta: intersection of daterange