pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedImprove examples for range operators
2+ messages / 2 participants
[nested] [flat]
* Improve examples for range operators
@ 2019-02-20 12:27 PG Doc comments form <noreply@postgresql.org>
2019-02-22 01:18 ` Re: Improve examples for range operators Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2019-02-20 12:27 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: kes-kes@yandex.ru
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/11/functions-range.html
Description:
Hi.
It would be nice if next examples:
<< strictly left of int8range(1,10) << int8range(100,110) t
>> strictly right of int8range(50,60) >> int8range(20,30) t
&< does not extend to the right of int8range(1,20) &< int8range(18,20)
t
&> does not extend to the left of int8range(7,20) &> int8range(5,10) t
are extended by:
**not** strictly left of, **not** strictly right of, **extends** to the
right of, **extends** to the left of
Because without manual experiments I can not imagine the ranges that cause
'false' result for the examples above.
Thank you.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Improve examples for range operators
2019-02-20 12:27 Improve examples for range operators PG Doc comments form <noreply@postgresql.org>
@ 2019-02-22 01:18 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2019-02-22 01:18 UTC (permalink / raw)
To: kes-kes@yandex.ru; pgsql-docs@lists.postgresql.org
On Wed, Feb 20, 2019 at 12:27:26PM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/11/functions-range.html
> Description:
>
> Hi.
>
> It would be nice if next examples:
>
> << strictly left of int8range(1,10) << int8range(100,110) t
> >> strictly right of int8range(50,60) >> int8range(20,30) t
> &< does not extend to the right of int8range(1,20) &< int8range(18,20)
> t
> &> does not extend to the left of int8range(7,20) &> int8range(5,10) t
>
> are extended by:
> **not** strictly left of, **not** strictly right of, **extends** to the
> right of, **extends** to the left of
>
> Because without manual experiments I can not imagine the ranges that cause
> 'false' result for the examples above.
Well, they are not technically negatives of each other. << means the
first is all left of the second, while &< means that it doesn't go to
the right of the second, e.g.,
SELECT int8range(1,10) &< int8range(100,110);
?column?
----------
t
SELECT int8range(1,105) &< int8range(100,110);
?column?
----------
t
SELECT int8range(1,200) &< int8range(100,110);
?column?
----------
f
Notice it changed from true to false and none of these was strictly to
the right.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-02-22 01:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 12:27 Improve examples for range operators PG Doc comments form <noreply@postgresql.org>
2019-02-22 01:18 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox