Improve examples: Provide the example which extend to the left of the range

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: kes-kes(at)yandex(dot)ru
Subject: Improve examples: Provide the example which extend to the left of the range
Date: 2025-01-19 16:23:38
Message-ID: 173730381859.2146422.14502597580502607156@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/functions-range.html
Description:

Hi.
All examples on this page uses `not extend` expression:

```
anyrange &< anyrange → boolean

Does the first range not extend to the right of the second?

int8range(1,20) &< int8range(18,20) → t

anyrange &> anyrange → boolean

Does the first range not extend to the left of the second?

int8range(7,20) &> int8range(5,10) → t

...

anymultirange &> anymultirange → boolean

Does the first multirange not extend to the left of the second?

'{[7,20)}'::int8multirange &> '{[5,10)}'::int8multirange → t

anymultirange &> anyrange → boolean

Does the multirange not extend to the left of the range?

'{[7,20)}'::int8multirange &> int8range(5,10) → t
```

It would be nice to have examples which `extend to the other range`. Eg. the
first example shows how to not extend, the second shows how to extend. Or
`range` examples shows how to not extend left/right, and the `multirange`
examples shows how to extend to the left/right.

Thank you.

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-01-20 13:28:53 Typo on tutorial window page
Previous Message Laurenz Albe 2025-01-19 11:16:46 Re: [Appendix C. SQL Key Words] Missing keywords