How to execlude same month and year in Postgres

30 views Asked by At

short code

drop table if exists x;
create temp table x(
d date,
  exclude using gist (extract(month from d) with =,
                      extract(year from d) with =)
);

how to make this possible CREATE EXTENSION if not exists btree_gist; -- i also tried

I don't want overlapping month and year

0

There are 0 answers