X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B24944760BC for ; Sun, 2 Mar 2003 07:02:57 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 91279-07 for ; Sun, 2 Mar 2003 07:02:56 -0500 (EST) Received: from zzz.zzz (unknown [212.57.173.149]) by postgresql.org (Postfix) with ESMTP id 8033947635B for ; Sun, 2 Mar 2003 04:29:25 -0500 (EST) Date: Sun, 2 Mar 2003 14:24:01 +0500 From: Denis Zaitsev To: pgsql-sql@postgresql.org Subject: default operator class (PostgreSQL's error?) Message-ID: <20030302142401.B4208@natasha.zzz.zzz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/46 X-Sequence-Number: 12086 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.