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 4A9C5D1C4ED for ; Tue, 1 Jun 2004 11:25:39 -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 35903-07 for ; Tue, 1 Jun 2004 11:25:41 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id EBACBD1BAA0 for ; Tue, 1 Jun 2004 11:25:36 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i51EPfM4002733; Tue, 1 Jun 2004 10:25:41 -0400 (EDT) To: cgg007@yahoo.com Cc: pgsql-sql@postgresql.org Subject: Re: Schemata & User-Defined-Type casting issues In-reply-to: <20040601140045.36502.qmail@web13808.mail.yahoo.com> References: <20040601140045.36502.qmail@web13808.mail.yahoo.com> Comments: In-reply-to Chris Gamache message dated "Tue, 01 Jun 2004 07:00:45 -0700" Date: Tue, 01 Jun 2004 10:25:41 -0400 Message-ID: <2732.1086099941@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Level: * X-Archive-Number: 200406/4 X-Sequence-Number: 17949 Chris Gamache writes: > 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. Indeed, since as far as the system knows those two datatypes have nothing to do with each other. I'd go ahead and define an assignment cast WITHOUT FUNCTION to let you do the conversion. regards, tom lane