Re: Porting from ORACLE to PostgSQL

From: gustavo halperin <ggh(dot)develop(at)gmail(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Porting from ORACLE to PostgSQL
Date: 2006-09-05 11:57:27
Message-ID: 44FD6627.4010503@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Mair wrote:
>> I need to porting many old ORACLE-oriented-SQL files and I have many
>> problem with this code. Sometimes the code use some types not supported
>> in PosgSQL like "number" or "varchar2", there fore, can I write some
>> type of declaration (like in c : #define alias_name name) in order to
>> make PosgSQL recognize these types? Or there are other solution that you
>> recommend to use ?
>>
>
> You might look into the contrib package "ora2pg".
>
> There's also a more ambitious project called "protopg".
> That's in pre-alpha state, though. A development snapshots
> for the *very* *adventurous* can be obtained here:
> http://protopg.projects.postgresql.org/nightlies/
>
> Bye, Chris.
>
Thank you, but nothing work.
1. The orafce from www.pgfoundry.org doesn't pass the make step, is
looking for some files that doesn't exist, see below:
orafce : make
Makefile:16: ../../src/Makefile.global: No such file or directory
Makefile:17: /contrib/contrib-global.mk: No such file or directory
make: *** No rule to make target `/contrib/contrib-global.mk'. Stop.

2. ora2pg, looks like something that extract DB schemes from a running
oracle DB, but I have not ORACLE running. I just have old ORACLE/SQL
sources that I need parser to SQL or PostgSQL.

3. About the ambitious project "protopg", I success to compile this
projects but the parser fall. The parse have a problem with a word
"CONSTRAINT", see below:
protopg-20060905 : ./ora_parser < tes.sql
-- syntax error, unexpected "CONSTRAINT", expecting ORA_ID on line 6 --

-- BEGIN OF UNRECOGNIZED STATEMENT
CREATE TABLE v5templates . cmt_items ( item_id NUMBER ( 7 ) ,
template_id NUMBER ( 7 ) , page_title VARCHAR2 ( 100 ) , CONSTRAINT
pk_cmt PRIMARY KEY ( item_id ) ) ;
-- END OF UNRECOGNIZED STATEMENT

I will try debug it, or maybe send a mail to the developer/contacts.

Any way, thank very much, Gustavo

--
||\ // \
| \\ // |
I'm thinking. \ \\ l\\l_ // |
_ _ | \\/ `/ `.| |
/~\\ \ //~\ | Y | | || Y |
| \\ \ // | | \| | |\ / |
[ || || ] \ | o|o | > /
] Y || || Y [ \___\_--_ /_/__/
| \_|l,------.l|_/ | /.-\(____) /--.\
| >' `< | `--(______)----'
\ (/~`--____--'~\) / U// U / \
`-_>-__________-<_-' / \ / /|
/(_#(__)#_)\ ( .) / / ]
\___/__\___/ `.`' / [
/__`--'__\ |`-' |
/\(__,>-~~ __) | |__
/\//\\( `--~~ ) _l |--:.
'\/ <^\ /^> | ` ( < \\
_\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/
(___\ /___) (____/ (____) `---'

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yonatan Ben-Nes 2006-09-05 12:01:28 Re: Tsearch2 & Hebrew
Previous Message Michael Ben-Nes 2006-09-05 11:56:21 Re: The server's LC_CTYPE locale