X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7CB085E37CE for ; Mon, 23 Aug 2004 14:08:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03546-09 for ; Mon, 23 Aug 2004 17:08:13 +0000 (GMT) Received: from mailgate.cubis.de (send.cubis.de [195.226.172.140]) by svr1.postgresql.org (Postfix) with ESMTP id A672E5E3631 for ; Mon, 23 Aug 2004 14:08:09 -0300 (ADT) Received: from mailscan-1.tuev-mitte.de (mailscan-1.tuev-mitte.de [10.0.142.44] (may be forged)) by mailgate.cubis.de (Switch-2.2.9/Switch-2.2.4) with SMTP id W7NH085L00000AC4 for ; Mon, 23 Aug 2004 19:08:05 +0200 Received: From mailscan-2.tuev-mitte.de ([10.0.142.43]) by mailscan-1.tuev-mitte.de (WebShield SMTP v4.5 MR1a P0803.345); id 109328088386; Mon, 23 Aug 2004 19:08:03 +0200 Received: From snsrv003.secumail.de ([10.36.12.43]) by mailscan-2.tuev-mitte.de (WebShield SMTP v4.5 MR1a P0803.354); id 1093280882501; Mon, 23 Aug 2004 19:08:02 +0200 Received: from sn-e0310.ek.secunet.de ([10.36.13.215]) by snsrv003.secumail.de with Microsoft SMTPSVC(5.0.2195.6713); Mon, 23 Aug 2004 19:08:03 +0200 Received: from sn-e0310.ek.secunet.de (localhost [127.0.0.1]) by sn-e0310.ek.secunet.de (Postfix) with ESMTP id 7018F57A84 for ; Mon, 23 Aug 2004 19:08:03 +0200 (CEST) To: pgsql-sql@postgresql.org Subject: CREATE TYPE VARCHAR2 From: Sascha Ziemann Date: 23 Aug 2004 19:08:03 +0200 In-Reply-To: Message-ID: Lines: 21 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 23 Aug 2004 17:08:03.0953 (UTC) FILETIME=[C0858610:01C48933] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=SUBJ_ALL_CAPS X-Spam-Level: X-Archive-Number: 200408/273 X-Sequence-Number: 18770 Hi, I try to emulate with PostgreSQL an Oracle database. My problem is that PostgreSQL does not support any Oracle specific types. PostgreSQL provides the TEXT and Oracle uses the CLOB or VARCHAR2 type. I would like to use the CREATE TYPE statement to tell PostgreSQL about the Oracle types, but the documentation does not describe how to define a simple alias type. I would like to define a new type VARCHAR2 which should behave exactly like VARCHAR. Is this possible with PostgreSQL? By this it would be possible to run the Oracle create table scripts without modification. cu Sascha -- secunet Security Networks AG, Im Teelbruch 116, 45219 Essen Tel: +49-2054-123-408 Fax: +49-2054-123-123 PGP: FBE2 A49B 6526 C1B4 7F10 24E4 5004 7C27 6E9A 9698 Besuchen Sie uns auf der DMS-Expo vom 07. - 09. September 2004 in Essen, Halle 2, Stand 2435 c/d (Consulting Corner).