Hackers, I need a constraint that ensures that a text[] column has only unique values -- that is, that there is no overlap of values between rows. I thought this was a made-to-order for an exclusion constraint. So I tried it:
david=# create table tags (names text[] primary key, exclude using gist (names WITH &&));NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tags_pkey" for table "tags" ERROR: data type text[] has no default operator class for access method "gist" HINT: You must specify an operator class for the index or define a default operator class for the data type. Rats! It looks like there is only a gin operator family for arrays, not gist, and exclusion constraints support only gist indexes, and I couldn't find an operator class, either. Have I missed something, in my (likely) ignorance? Or are there perhaps some types to consider modifying to support exclusion constraints? Thanks, David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers