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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux