Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 17ED7632A91 for ; Sun, 15 Mar 2009 20:53:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 21706-09 for ; Sun, 15 Mar 2009 20:53:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mail.postgresql.org (Postfix) with ESMTP id 106BA632465 for ; Sun, 15 Mar 2009 20:53:20 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Lj08o-0001HC-75 for pgsql-general@postgresql.org; Sun, 15 Mar 2009 23:53:14 +0000 Received: from ppp-93-104-82-174.dynamic.mnet-online.de ([93.104.82.174]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Mar 2009 23:53:14 +0000 Received: from spam_eater by ppp-93-104-82-174.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Mar 2009 23:53:14 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Thomas Kellerer Subject: Re: Oracle to PostgreSQL Date: Mon, 16 Mar 2009 00:53:03 +0100 Lines: 27 Message-ID: References: <49BD9231.4010602@hogranch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-93-104-82-174.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 In-Reply-To: <49BD9231.4010602@hogranch.com> Cc: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/571 X-Sequence-Number: 145157 John R Pierce wrote on 16.03.2009 00:41: > Greenhorn wrote: >> Unfortunately When I execute the above files using \i I am getting >> errors like >> >> ERROR: syntax error at or near "(" >> LINE 4: SUB_TYPE NUMBER(3) NOT NULL, >> >> Obviously 'number' is not PostgreSQL data type so is 'varchar2'. What >> is your suggestion to create these tables in PostgreSQL? Should I >> pre-process using Sed/Awk to find/replace the field type first? Any >> recommendation is greatly appreciated :) >> > > change number to numeric, and varchar2 to char and you'll likely be good. > > > My guess would have been that varchar is the equivalent to varchar2 char does a blank padding and is different in behaviour to varchar (as it is in Oracle) Thomas