Lists: | pgsql-docs |
---|
From: | etulsky(at)gmail(dot)com |
---|---|
To: | pgsql-docs(at)postgresql(dot)org |
Subject: | Example for intersection operator is wrong |
Date: | 2016-07-14 16:28:12 |
Message-ID: | 20160714162812.1425.65054@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/9.2/static/functions-range.html
Description:
On the page https://www.postgresql.org/docs/9.2/static/functions-range.html
it gives an example for the intersection of range (5,15) and range (10,20)
as [10,15). But 10 isn't included in the second range; the actual output of
this operator is [11,15).
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | etulsky(at)gmail(dot)com |
Cc: | pgsql-docs(at)postgresql(dot)org |
Subject: | Re: Example for intersection operator is wrong |
Date: | 2016-07-14 17:36:54 |
Message-ID: | 8266.1468517814@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-docs |
etulsky(at)gmail(dot)com writes:
> The following documentation comment has been logged on the website:
> Page: https://www.postgresql.org/docs/9.2/static/functions-range.html
> Description:
> On the page https://www.postgresql.org/docs/9.2/static/functions-range.html
> it gives an example for the intersection of range (5,15) and range (10,20)
> as [10,15). But 10 isn't included in the second range; the actual output of
> this operator is [11,15).
Uh, no, it isn't:
regression=# select int8range(5,15) * int8range(10,20);
?column?
----------
[10,15)
(1 row)
You'd be correct if int8range(10,20) produced '(10,20)', but it produces
'[10,20)'.
regards, tom lane