With the brand new Postgres 18, we can use the built-in WITHOUTÂ OVERLAPS constraint. https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=fc0438b4e
WITHOUTÂ OVERLAPS