> or is there something built in that I have missed?
The intarray extension in the contrib provides a GiST operator class
for int[]. That can be used with exclusion constraints:
> hasegeli=# create extension intarray;
> CREATE EXTENSION
>
> hasegeli=# create type e as enum ('a', 'b');
> CREATE T
Using Pg 9.5.2 on linux.
Trying to create an exclusion constraint on an array of enums.
Ultimate goal is having a constraint that excludes records with
overlapping elements.
This must have been done before, I just cannot find any examples.
I realize there isn't a q&d way to convert enums to int