Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[DOCS] Example for intersection operator is wrong

0 views
Skip to first unread message

etu...@gmail.com

unread,
Jul 14, 2016, 1:21:49 PM7/14/16
to
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).

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

Tom Lane

unread,
Jul 14, 2016, 1:37:34 PM7/14/16
to
etu...@gmail.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
0 new messages