pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Oracle to PostgreSQL
Date: Mon, 16 Mar 2009 00:53:03 +0100
Message-ID: <gpk4cv$4f1$1@ger.gmane.org> (raw)
In-Reply-To: <49BD9231.4010602@hogranch.com>
References: <ddcb1c340903151635xdb9ee7fva0edd6adc7575662@mail.gmail.com>
	<49BD9231.4010602@hogranch.com>

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







view thread (14+ messages)  latest in thread

Message-ID: <gpk4cv$4f1$1@ger.gmane.org>
Permalink:  ../gpk4cv$4f1$1@ger.gmane.org/
Also on:    postgresql.org/message-id/gpk4cv$4f1$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: spam_eater@gmx.net, pgsql-sql@postgresql.org
  Subject: Re: Oracle to PostgreSQL
  In-Reply-To: <gpk4cv$4f1$1@ger.gmane.org>
  References: <ddcb1c340903151635xdb9ee7fva0edd6adc7575662@mail.gmail.com> <49BD9231.4010602@hogranch.com> <gpk4cv$4f1$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox