Make a range
tstzrange(lo, hi) builds a range, closed at the start and open at the end by default. @> tests whether it contains a value.
task
Build the range 09:00 to 17:00 on 2026-06-30 as tstzrange and test whether 12:00 is in it.
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
tstzrange(lo, hi) builds a range, closed at the start and open at the end by default. @> tests whether it contains a value.
Build the range 09:00 to 17:00 on 2026-06-30 as tstzrange and test whether 12:00 is in it.