# Supabase — Simplifying Time-Based Queries with Range Columns

- Company: Supabase (supabase.com)
- Announced: 2024-07-11
- Category: not stated
- Coverage: not counted
- Announcement: no
- Group: routine
- Source: https://supabase.com/blog/range-columns
- Record: https://forck.live/items/21420-simplifying-time-based-queries-with-range-columns
- Subject: Supabase

Supabase's guide explains how PostgreSQL range types (tstzrange, daterange, int4range) can replace separate start/end columns to simplify overlap queries and add exclusion constraints that prevent conflicting reservations, including per-table constraints using the btree_gist extension.

## Evidence

Verbatim from https://supabase.com/blog/range-columns:

> Range types are data types in Postgres that hold the beginning and end of a range of a base type. The range of int4 is int4range , the range of timestamptz is tstzrange , and the range of date is daterange .

---

Record: https://forck.live/items/21420-simplifying-time-based-queries-with-range-columns
Catalogue: https://forck.live/llms.txt
Current issue: https://forck.live/feed.md
