This is a discussion on Porting from ORACLE to PostgSQL within the Pgsql General forums, part of the PostgreSQL category; --> Hello I need to porting many old ORACLE-oriented-SQL files and I have many problem with this code. Sometimes the ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello 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 ? Thank you, Gustavo -- ||\ // \ | \\ // | I'm thinking. \ \\ l\\l_ // | _ _ | \\/ `/ `.| | /~\\ \ //~\ | Y | | || Y | | \\ \ // | | \| | |\ / | [ || || ] \ | o|o | > / ] Y || || Y [ \___\_--_ /_/__/ | \_|l,------.l|_/ | /.-\(____) /--.\ | >' `< | `--(______)----' \ (/~`--____--'~\) / U// U / \ `-_>-__________-<_-' / \ / /| /(_#(__)#_)\ ( .) / / ] \___/__\___/ `.`' / [ /__`--'__\ |`-' | /\(__,>-~~ __) | |__ /\//\\( `--~~ ) _l |--:. '\/ <^\ /^> | ` ( < \\ _\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/ (___\ /___) (____/ (____) `---' ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| gustavo halperin wrote: > Hello > > 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 ? > Look at the orafce project on www.pgfoundry.org. They have ALOT of Oracle types (over 100). Sincerely, Joshua D. Drake > Thank you, Gustavo > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| > 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. -- Chris Mair http://www.1006.org ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| 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 |--:. '\/ <^\ /^> | ` ( < \\ _\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/ (___\ /___) (____/ (____) `---' ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| On 9/5/06, gustavo halperin <ggh.develop@gmail.com> wrote: > 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 ? don't the enterprisedb people specialize in oracle porting? merlin ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| >> 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. It is designed to be built from the postgresql source tree. If you have a postgresql source tree put the orafce directory in contrib and try again. Sincerely, Joshua D. Drake > > 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 > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| gustavo halperin <ggh.develop@gmail.com> writes: > 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. It looks like it's expecting to be built inside the contrib directory of a configured Postgres source tree. If you have a version that knows about pgxs you can build it outside the source tree with make USE_PGXS=1 regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| > 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. That would be me Protopg knows only a small part of Oracle Syntax. It's origins are a academic background were we had one sample DB and were looking how far we got in translating that one. If you throw random Oracle DBs at it, it will likely stumble over some pieces. Nonetheless it might be partially helpful. If you like it, subscribe to http://pgfoundry.org/mailman/listinf...opg-developers If nothing else, when we put out some prerelease, it would be cool if you could help us testing it with your test case Bye, Chris. -- Chris Mair http://www.1006.org ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| Perhaps you should look at EnterpriseDB -- It's an Oracle-compliant wrapper for postgreSQL.... "gustavo halperin" <ggh.develop@gmail.com> wrote in message news:44FCA0A7.5080100@gmail.com... > Hello > > 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 ? > > Thank you, Gustavo > > -- > ||\ // \ > | \\ // | I'm thinking. > \ \\ l\\l_ // | > _ _ | \\/ `/ `.| | > /~\\ \ //~\ | Y | | || Y | > | \\ \ // | | \| | |\ / | > [ || || ] \ | o|o | > / > ] Y || || Y [ \___\_--_ /_/__/ > | \_|l,------.l|_/ | /.-\(____) /--.\ > | >' `< | `--(______)----' > \ (/~`--____--'~\) / U// U / \ > `-_>-__________-<_-' / \ / /| > /(_#(__)#_)\ ( .) / / ] > \___/__\___/ `.`' / [ > /__`--'__\ |`-' | > /\(__,>-~~ __) | |__ > /\//\\( `--~~ ) _l |--:. > '\/ <^\ /^> | ` ( < \\ > _\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/ > (___\ /___) (____/ (____) `---' > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > |
| ||||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Eliminating 21 line .signatures would be nice, too. codeWarrior wrote: > Perhaps you should look at EnterpriseDB -- It's an Oracle-compliant wrapper > for postgreSQL.... > > > > > "gustavo halperin" <ggh.develop@gmail.com> wrote in message > news:44FCA0A7.5080100@gmail.com... >> Hello >> >> 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 ? >> >> Thank you, Gustavo - -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE/aQWS9HxQb37XmcRArJVAKCNjKPIGC0dZKCZNgZBTz9wdYl7nQC fYZFU etqDdW8rRm+gXShS1iF3Nq8= =g+pL -----END PGP SIGNATURE----- ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |