From: | Denis Zaitsev <zzz(at)cd-club(dot)ru> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | default operator class (PostgreSQL's error?) |
Date: | 2003-03-02 09:24:01 |
Message-ID: | 20030302142401.B4208@natasha.zzz.zzz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 class for 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2003-03-02 14:10:25 | Re: Inquiry From Form [pgsql] |
Previous Message | Stephan Szabo | 2003-03-02 07:33:00 | Re: OUTER JOIN with filter |