Is it possible to create an array of unique UUIDs ...
# sql
t
Is it possible to create an array of unique UUIDs column?
c
I don't think PostgreSQL has a set() built-in type (https://www.postgresql.org/docs/9.5/datatype.html) so I think your options are: - use an array of UUIDs and add a check constraint on the table which enforces uniqueness (maybe implemented like this https://dba.stackexchange.com/questions/226456/how-can-i-get-a-unique-array-in-postgresql) - Use a JSON/JSONB as the type of the col and the UUIDs will be the keys of the object (since JSON/JSONB does NOT allow repeating keys)
t
Ignore what I said if you saw it
Thanks for the help btw :)
n
Thread was archived by @TMShader. Anyone can send a message to unarchive it.