X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C3252D1B1CE for ; Thu, 10 Jun 2004 11:34:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51102-08 for ; Thu, 10 Jun 2004 14:34:55 +0000 (GMT) Received: from web13804.mail.yahoo.com (web13804.mail.yahoo.com [216.136.175.14]) by svr1.postgresql.org (Postfix) with SMTP id 31072D1B1A5 for ; Thu, 10 Jun 2004 11:34:50 -0300 (ADT) Message-ID: <20040610143454.13820.qmail@web13804.mail.yahoo.com> Received: from [216.173.173.66] by web13804.mail.yahoo.com via HTTP; Thu, 10 Jun 2004 07:34:54 PDT Date: Thu, 10 Jun 2004 07:34:54 -0700 (PDT) From: Chris Gamache Reply-To: cgg007@yahoo.com Subject: Re: Schema + User-Defined Data Type Indexing problems... To: Tom Lane Cc: pgsql-sql@postgresql.org In-Reply-To: <24190.1086876593@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS X-Spam-Level: X-Archive-Number: 200406/86 X-Sequence-Number: 18031 --- Tom Lane wrote: > In practice I'm not sure that this is really a situation that we need to > fret about, because using a datatype that isn't in your search path has > got notational problems that are orders of magnitude worse than this > one. The functions and operators that do something useful with the > datatype would also have to be schema-qualified every time you use them. > This is perhaps tolerable for functions but it's quite unpleasant for > operators :-( You can't write > select * from foo where my_uuid = 'xxx'; > instead > select * from foo where my_uuid operator(my_schema.=) 'xxx'; > Yech. I think you'll end up putting uuid's schema in your search path > before long anyway. Right you are. I guess the moral of the story is that when using custom datatypes, search_path is a required setting. I guess that is why the "public" schema should be just that, completely accessable by any user with rights to the DB. So, is the best-practice for the my_schema tables to reference the user-defined datatype in the "public" schema? CREATE TABLE my_schema.foo (uuid public.uniqueidentifier); __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/