Schemata & User-Defined-Type casting issues - Mailing list pgsql-sql

From Chris Gamache
Subject Schemata & User-Defined-Type casting issues
Date
Msg-id 20040601140045.36502.qmail@web13808.mail.yahoo.com
Whole thread Raw
In response to assistance on self join pls  ("email lists" <lists@darrenmackay.com>)
Responses Re: Schemata & User-Defined-Type casting issues
List pgsql-sql
PostgreSQL 7.4.2 ...

Background: I'm attempting to migrate tables which were created in the
pre-schema days to a sensible schema setup. I'm using the "uniqueidentifier"
column in some of these tables. When I created the new schema, I created an
instance of "uniqueidentifier" and its supporting functions and casts within
the new schema. When I try to "INSERT INTO myschema.mytable ... SELECT ... FROM
public.mytable;" It's having difficulty seeing that the data types are
compatible across the schema. An explicit cast (without first casting to a
neuter data-type) won't work for the same reason.

I'm torn: Should I create a "cast" to allow for casting of this data-type
across schemas, or should I have created the table referencing the user-defined
type in the public schema? 

I expect that this problem will rise up now and again. I'd like to solve it in
the this early phase with a proper deisgn-based fix.

If it makes a difference, I would like to not include this schema in the search
path, to explicitly refer to it as myschema.mytable anywhere I need to
reference it.

CG

    
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: sum ( time) problem
Next
From: Tom Lane
Date:
Subject: Re: Schemata & User-Defined-Type casting issues