default operator class (PostgreSQL's error?)
От | Denis Zaitsev |
---|---|
Тема | default operator class (PostgreSQL's error?) |
Дата | |
Msg-id | 20030302142401.B4208@natasha.zzz.zzz обсуждение исходный текст |
Ответы |
Re: default operator class (PostgreSQL's error?)
|
Список | pgsql-sql |
I create a scalar type name_t. Then I define the operator class for it: create operator class name_ops default for type name_t using btree as operator 1 <, operator 2 <=, operator 3 =, operator 4 >=, operator 5 >, function 1 name_cmp (name_t,name_t); And it is DEFAULT for the type. Then I create some table: create table name_l ( name name_t unique not null, key smallint primary key, sex sex ); And the UNIQUE constraint leads to the next error: ERROR: data type name_t has no default operator class for access method "btree" You must specify an operator classfor the index or define a default operator class for the data type (There is no (of course?) such an error if I not use the UNIQUE constraint). So, does this mean that it's an error in PostreSQL or it is my fail thru some way? Thanks in advance.
В списке pgsql-sql по дате отправления: