Re: Oracle to PostgreSQL

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Greenhorn <user(dot)postgresql(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Oracle to PostgreSQL
Date: 2009-03-15 23:41:37
Message-ID: 49BD9231.4010602@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2009-03-15 23:53:03 Re: Oracle to PostgreSQL
Previous Message Greenhorn 2009-03-15 23:35:02 Oracle to PostgreSQL

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Kellerer 2009-03-15 23:53:03 Re: Oracle to PostgreSQL
Previous Message Greenhorn 2009-03-15 23:35:02 Oracle to PostgreSQL