From: Martijn van Oosterhout <kleptog@svana.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Cc: cgg007@yahoo.com
Subject: Re: Schema search for default operator classes (was: [ADMIN] Cross schema Primary Key Indexes problem with datatype in the public schema)
Date: Thu, 9 Feb 2006 10:35:41 +0100
Message-ID: <20060209093541.GB14457@svana.org> (raw)
In-Reply-To: <22538.1139450686@sss.pgh.pa.us>
References: <20060208195933.6993.qmail@web32515.mail.mud.yahoo.com>
<22538.1139450686@sss.pgh.pa.us>
On Wed, Feb 08, 2006 at 09:04:46PM -0500, Tom Lane wrote:
> http://archives.postgresql.org/pgsql-admin/2006-02/msg00084.php
> reports a problem with default btree operator classes that are
> not in pg_catalog: you can create a UNIQUE or PRIMARY KEY constraint
> that depends on such an opclass, but then when you pg_dump and
> try to reload, you get something like
<snip>
> The only other solution I can see is to extend the ADD CONSTRAINT syntax
> to allow explicit specification of an opclass for each column. This
> might be a good thing to do in itself, but it looks like a new feature
> to me, rather than something we could reasonably apply as a bug fix.
> It would certainly be a much larger code change (affecting both pg_dump
> and the backend) than changing the behavior of GetDefaultOpClass. And
> it'd not fix the problem for existing dump files, either.
>
> So I'm leaning towards removing the search-path dependency of
> GetDefaultOpClass. Comments?
I'm for. IMHO, if you give someone has access to the type they should
have access to the supporting machinary. Whoever created the type
probably also created the operator class and intended it to be used.
For a comparison, we don't check the schema on looking up type
input/output functions (well, we don't need to because we have the oid,
but the idea is important).
W.R.T. the other option (per column opclass specification), if we ever
do COLLATE users will be allowed to specify it on a per-column basis
anyway. Then specifying opclasses becomes redundant. I've been
seriously neglecting this patch but hope to get back to it soon...
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
Attachments:
signature.asc (application/pgp-signature, 188B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: kleptog@svana.org, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org, cgg007@yahoo.com
Subject: Re: Schema search for default operator classes (was: [ADMIN] Cross schema Primary Key Indexes problem with datatype in the public schema)
In-Reply-To: <20060209093541.GB14457@svana.org>
References: <20060208195933.6993.qmail@web32515.mail.mud.yahoo.com> <22538.1139450686@sss.pgh.pa.us> <20060209093541.GB14457@svana.org>
* 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