Comment

Comment by waffle_ss

It's so you can't define two billings for the same period (say, the same month). To prevent you from double-billing someone.

&& 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...

parent waffle_ss 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton