X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id F27BE9DCCC6 for ; Thu, 9 Feb 2006 08:42:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30864-03 for ; Thu, 9 Feb 2006 08:42:51 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id EAB2F9DCA47 for ; Thu, 9 Feb 2006 08:42:46 -0400 (AST) Received: from alvh.no-ip.org (201-221-200-5.bk11-dsl.surnet.cl [201.221.200.5]) by svr4.postgresql.org (Postfix) with ESMTP id E8C815AF08B for ; Thu, 9 Feb 2006 12:42:50 +0000 (GMT) Received: by alvh.no-ip.org (Postfix, from userid 1000) id 94390C2DC59; Thu, 9 Feb 2006 09:42:48 -0300 (CLST) Date: Thu, 9 Feb 2006 09:42:48 -0300 From: Alvaro Herrera To: Tom Lane Cc: 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) Message-ID: <20060209124248.GC5234@surnet.cl> Mail-Followup-To: Tom Lane , pgsql-hackers@postgreSQL.org, cgg007@yahoo.com References: <20060208195933.6993.qmail@web32515.mail.mud.yahoo.com> <22538.1139450686@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22538.1139450686@sss.pgh.pa.us> User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.485 required=5 tests=[AWL=-0.434, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 1.485 X-Spam-Level: * X-Archive-Number: 200602/294 X-Sequence-Number: 79432 Tom Lane wrote: > Given that we only allow one default opclass for a datatype regardless > of schema (see DefineOpClass), it's not really necessary for > GetDefaultOpClass to restrict its search. I can think of some corner > cases involving multiple binary-compatible-datatype matches where the > restriction might give a unique answer when an unrestricted search would > not, but I kinda doubt this would ever arise in practice. How about doing the constrained search first, and revert to the unconstrained behavior if it doesn't find the desired opclass? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support