From: Chris Gamache <cgg007@yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Schema + User-Defined Data Type Indexing problems...
Date: Thu, 10 Jun 2004 07:34:54 -0700 (PDT)
Message-ID: <20040610143454.13820.qmail@web13804.mail.yahoo.com> (raw)
In-Reply-To: <24190.1086876593@sss.pgh.pa.us>
--- Tom Lane <tgl@sss.pgh.pa.us> 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/
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cgg007@yahoo.com, tgl@sss.pgh.pa.us
Subject: Re: Schema + User-Defined Data Type Indexing problems...
In-Reply-To: <20040610143454.13820.qmail@web13804.mail.yahoo.com>
* 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