Cross schema Primary Key Indexes problem with datatype in the public schema

From: CG <cgg007(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Cross schema Primary Key Indexes problem with datatype in the public schema
Date: 2006-02-08 19:59:33
Message-ID: 20060208195933.6993.qmail@web32515.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers


PostgreSQL 8.1

I'm using the uniqueidentifier datatype for a primary key in these tables. The
uniqueidentifier datatype is specified in the public schema. There is a default
operator class defined for "btree" in the public schema. These table_# tables
are in a different schema, second on the list in the search path. I can issue
the command from psql "ALTER TABLE ONLY table_1 ADD CONSTRAINT
table_1_luuid_pkey PRIMARY KEY (luuid);" and the SQL statement runs fine.
Here's the output from pg_restore...

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2982; 2606 44309156 CONSTRAINT
table_1_luuid_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: data type
public.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.
Command was: ALTER TABLE ONLY table_1
ADD CONSTRAINT table_1_luuid_pkey PRIMARY KEY (luuid);
pg_restore: creating CONSTRAINT table_2_luuid_pkey
pg_restore: [archiver (db)] Error from TOC entry 2988; 2606 44309158 CONSTRAINT
table_2_luuid_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: data type
public.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.
Command was: ALTER TABLE ONLY table_2
ADD CONSTRAINT table_2_luuid_pkey PRIMARY KEY (luuid);
pg_restore: creating CONSTRAINT table_3_luuid_pkey
pg_restore: [archiver (db)] Error from TOC entry 2990; 2606 44309160 CONSTRAINT
table_3_luuid_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: data type
public.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.
Command was: ALTER TABLE ONLY table_3
ADD CONSTRAINT table_3_luuid_pkey PRIMARY KEY (luuid);
pg_restore: creating CONSTRAINT table_3_puuid_pkey
pg_restore: [archiver (db)] Error from TOC entry 2960; 2606 44309162 CONSTRAINT
table_4_puuid_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: data type
public.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.
Command was: ALTER TABLE ONLY table_4
ADD CONSTRAINT table_4_puuid_pkey PRIMARY KEY (puuid);
pg_restore: creating CONSTRAINT table_5_puuid_pkey
pg_restore: [archiver (db)] Error from TOC entry 2998; 2606 44309164 CONSTRAINT
table_5_puuid_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: data type
public.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.
Command was: ALTER TABLE ONLY table_5
ADD CONSTRAINT table_5_puuid_pkey PRIMARY KEY (puuid);
pg_restore: creating CONSTRAINT table_6_puuid_pkey
pg_restore: [archiver (db)] Error from TOC entry 2962; 2606 44309166 CONSTRAINT
table_6_puuid_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR: data type
public.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.
Command was: ALTER TABLE ONLY table_6
ADD CONSTRAINT table_6_puuid_pkey PRIMARY KEY (puuid);

I'm not sure what to make of this.

I'm puzzled and need some help figuring this out!

CG

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David Bear 2006-02-08 20:12:14 auth methods
Previous Message David Lutterkort 2006-02-08 18:58:17 Manipulating pg_hba.conf

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2006-02-08 20:31:12 Re: [HACKERS] PGUpgrade WAS: Audio interview
Previous Message Josh Berkus 2006-02-08 19:55:27 Re: [HACKERS] PGUpgrade WAS: Audio interview