question

Started by Alexandr Sover 22 years ago2 messagesgeneral
Jump to latest
#1Alexandr S
sasha@in.crimea.ua

Hi
There is question. How can I set column varchar[] (array) as UNIQUE
(constraint)? (I need this to set foreign key, but for this to work
varchar[] must be primary key or unique).
I use pgadmin, and pgadmin answer: "Error: data type character varying[]
has no default operator class for access method "btree". You must
specify an operator class for the index or define a default operator
class for the data type" What should I do?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alexandr S (#1)
Re: question

Alexandr S <sasha@in.crimea.ua> writes:

There is question. How can I set column varchar[] (array) as UNIQUE

You cannot, in any Postgres version before 7.4. There isn't support for
indexes on array columns before 7.4.

regards, tom lane