X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6D93AD1B181 for ; Tue, 1 Jun 2004 11:00:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 26025-04 for ; Tue, 1 Jun 2004 11:00:47 -0300 (ADT) Received: from web13808.mail.yahoo.com (web13808.mail.yahoo.com [216.136.175.18]) by svr1.postgresql.org (Postfix) with SMTP id 34769D1B173 for ; Tue, 1 Jun 2004 11:00:42 -0300 (ADT) Message-ID: <20040601140045.36502.qmail@web13808.mail.yahoo.com> Received: from [216.173.173.66] by web13808.mail.yahoo.com via HTTP; Tue, 01 Jun 2004 07:00:45 PDT Date: Tue, 1 Jun 2004 07:00:45 -0700 (PDT) From: Chris Gamache Reply-To: cgg007@yahoo.com Subject: Schemata & User-Defined-Type casting issues To: pgsql-sql@postgresql.org In-Reply-To: <035C9F7CE28601428BBB5B051C9F77F2017922@orion.mackay.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.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/3 X-Sequence-Number: 17948 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/