X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A7F40D1B17C for ; Thu, 10 Jun 2004 01:21:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02123-05 for ; Thu, 10 Jun 2004 04:21:03 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C44A5D1B376 for ; Thu, 10 Jun 2004 01:21:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5A4L2N9019455; Thu, 10 Jun 2004 00:21:02 -0400 (EDT) To: cgg007@yahoo.com Cc: pgsql-sql@postgresql.org Subject: Re: Schema + User-Defined Data Type Indexing problems... In-reply-to: <20040609164103.36003.qmail@web13811.mail.yahoo.com> References: <20040609164103.36003.qmail@web13811.mail.yahoo.com> Comments: In-reply-to Chris Gamache message dated "Wed, 09 Jun 2004 09:41:03 -0700" Date: Thu, 10 Jun 2004 00:21:01 -0400 Message-ID: <19454.1086841261@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Level: * X-Archive-Number: 200406/77 X-Sequence-Number: 18022 Chris Gamache writes: > I'm having a heck of a time, and it seems like in my thrashing about > to find a solution to this problem I have ruined the uniqueidentifier > datatype in the schema... > CREATE INDEX mt_uuid_idx > ON my_schema.my_table USING btree (my_uuid); > ERROR: data type my_schema.uniqueidentifier has no default operator class for > access method "btree" > HINT: You must specify an operator class for the index or define a default > operator class for the data type. > I can look at the operator classes and see that there is an operator class for > btree for my_schema.uniqueidentifier. IIRC, the opclass has to be in a schema that is in your schema search path to be found by CREATE INDEX by default. If it isn't, you could specify it explicitly: CREATE INDEX mt_uuid_idx ON my_schema.my_table USING btree (my_uuid USING my_schema.uuidopclass); It's possible that we could think of a more convenient behavior for default opclasses, but I don't want to do something that would foreclose having similarly-named datatypes in different schemas. You have any suggestions? regards, tom lane