Where is the tsrange() function documented? - Mailing list pgsql-general

From Bryn Llewellyn
Subject Where is the tsrange() function documented?
Date
Msg-id 99FD2C6D-BF59-4D80-8335-5E67E5EA1750@yugabyte.com
Whole thread Raw
Responses Re: Where is the tsrange() function documented?
Re: Where is the tsrange() function documented?
List pgsql-general
I found my way to this by guesswork and good luck. (I happen to be using PG Version 13.5. But I don't suppose that this matters.)

Doing "\df tsrange()" gives this:

   Schema   |  Name   | Result data type |                      Argument data types                       | Type 
------------+---------+------------------+----------------------------------------------------------------+------
 pg_catalog | tsrange | tsrange          | timestamp without time zone, timestamp without time zone       | func
 pg_catalog | tsrange | tsrange          | timestamp without time zone, timestamp without time zone, text | func

And doing this:

\x on
with c as (
  select
    '2000-01-15'::timestamp as t1,
    '2000-05-15'::timestamp as t2)
select
  tsrange(t1, t2, '[]') as r1,
  tsrange(t1, t2, '[)') as r2,
  tsrange(t1, t2, '(]') as r3,
  tsrange(t1, t2, '()') as r4
from c;
\x off

gives this:

r1 | ["2000-01-15 00:00:00","2000-05-15 00:00:00"]
r2 | ["2000-01-15 00:00:00","2000-05-15 00:00:00")
r3 | ("2000-01-15 00:00:00","2000-05-15 00:00:00"]
r4 | ("2000-01-15 00:00:00","2000-05-15 00:00:00")

It's exactly what I was looking for. Now I want to refer colleagues to the PG doc on the tsrange() function.

But I can't formulate a search that finds it using the doc site's intrinsic search.

And I can't even find a single example of it on any site using Google.

Where is it?

pgsql-general by date:

Previous
From: Chris Williams
Date:
Subject: Re: Unsynchronized parallel dumps from 13.3 replica produced by pg_dump
Next
From: Scott Ribe
Date:
Subject: JSON query