From: Denis Zaitsev <zzz@cd-club.ru>
To: pgsql-sql@postgresql.org
Subject: default operator class (PostgreSQL's error?)
Date: Sun, 2 Mar 2003 14:24:01 +0500
Message-ID: <20030302142401.B4208@natasha.zzz.zzz> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: zzz@cd-club.ru
Subject: Re: default operator class (PostgreSQL's error?)
In-Reply-To: <20030302142401.B4208@natasha.zzz.zzz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox