pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Gamache <cgg007@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Schemata & User-Defined-Type casting issues
Date: Tue, 1 Jun 2004 07:00:45 -0700 (PDT)
Message-ID: <20040601140045.36502.qmail@web13808.mail.yahoo.com> (raw)
In-Reply-To: <035C9F7CE28601428BBB5B051C9F77F2017922@orion.mackay.local>

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/ 



view thread (2+ messages)  latest in thread

Message-ID: <20040601140045.36502.qmail@web13808.mail.yahoo.com>
Permalink:  ../20040601140045.36502.qmail@web13808.mail.yahoo.com/
Also on:    postgresql.org/message-id/20040601140045.36502.qmail@web13808.mail.yahoo.com

 · 

reply

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
  Subject: Re: Schemata & User-Defined-Type casting issues
  In-Reply-To: <20040601140045.36502.qmail@web13808.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