These are good, I've forgotten about some of them as well. As to:
EXCLUDE USING gist (
id WITH =,
period WITH &&
);"
What the heck? EXCLUDE USING gist (
id WITH =,
period WITH &&
);"
What the heck?&& is the range operator that checks for overlap.[1]
You have to use gist indexes to do this. And in fact this page doesn't mention it but you have to enable the btree_gist extension with:
CREATE EXTENSION btree_gist;
before the snippet above will work.[1]: https://www.postgresql.org/docs/current/static/functions-ran...