Re: pg_restore, search_path and operator class

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jozsef Szalay" <jszalay(at)storediq(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_restore, search_path and operator class
Date: 2008-02-15 23:52:43
Message-ID: 1738.1203119563@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jozsef Szalay" <jszalay(at)storediq(dot)com> writes:
> 8.1.2 on Linux

> I've got a user defined data type that has been defined in the "public"
> schema. I use pg_dump to dump a table that has a column of this type:
> create myschema.mytable (id public.mytype primary key, name varchar);
> ...
> psql:mytable.dump:48: ERROR: data type public.mytype has no default
> operator class for access method "btree"

Yeah, this is a known bug; it was fixed in ... umm ... 8.1.3 actually.

2006-02-10 14:01 tgl

* src/: backend/catalog/namespace.c, backend/commands/indexcmds.c,
backend/utils/cache/typcache.c, include/catalog/namespace.h,
include/commands/defrem.h (REL8_1_STABLE): Change search for
default operator classes so that it examines all opclasses
regardless of the current schema search path. Since CREATE
OPERATOR CLASS only allows one default opclass per datatype
regardless of schemas, this should have minimal impact, and it
fixes problems with failure to find a desired opclass while
restoring dump files. Per discussion at
http://archives.postgresql.org/pgsql-hackers/2006-02/msg00284.php.
Remove now-redundant-or-unused code in typcache.c and namespace.c,
and backpatch as far as 8.0.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dan Armbrust 2008-02-16 01:03:07 Re: performance issues on windows with 8.3.0?
Previous Message Scott Marlowe 2008-02-15 23:34:13 Re: Approaches for Lookup values (codes) in OLTP application