From: Tom Lane <tgl@sss.pgh.pa.us>
To: cgg007@yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Schema + User-Defined Data Type Indexing problems...
Date: Thu, 10 Jun 2004 00:21:01 -0400
Message-ID: <19454.1086841261@sss.pgh.pa.us> (raw)
In-Reply-To: <20040609164103.36003.qmail@web13811.mail.yahoo.com>
References: <20040609164103.36003.qmail@web13811.mail.yahoo.com>
Chris Gamache <cgg007@yahoo.com> 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
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: tgl@sss.pgh.pa.us, cgg007@yahoo.com
Subject: Re: Schema + User-Defined Data Type Indexing problems...
In-Reply-To: <19454.1086841261@sss.pgh.pa.us>
* 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