Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 18691633436; Sun, 15 Mar 2009 20:42:09 -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 19713-04; Sun, 15 Mar 2009 20:42:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hogranch.com (hogranch.com [75.101.82.47]) by mail.postgresql.org (Postfix) with ESMTP id 034F16331D1; Sun, 15 Mar 2009 20:42:06 -0300 (ADT) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id n2FNfbI05348; Sun, 15 Mar 2009 16:41:37 -0700 Message-ID: <49BD9231.4010602@hogranch.com> Date: Sun, 15 Mar 2009 16:41:37 -0700 From: John R Pierce User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Greenhorn CC: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Oracle to PostgreSQL References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/570 X-Sequence-Number: 145156 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.