Re: [GENERAL] Trying to create array of enum to array of text for exclusion constraint

2016-05-28 Thread Emre Hasegeli
> 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

[GENERAL] Trying to create array of enum to array of text for exclusion constraint

2016-05-05 Thread Steven Lembark
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