1)Strip all Postgres and or user-specific custom datatypes for ex if you see an in or out var declared as fubar chances are this wont map correctly in Oracle 2)Get to know packages..they work well to aggregate and organise 2a)Functions and Procedures which are used for a specific purpose for example HL7 events such as A01,A03 or A08 would be different implementations of a package base class A00 (Health Level 7) Base Structure 2b)Variables and or attributes which would support the Package type in my case HL7_Event_Type would be A01,A03 or A08 The safest way to transport functions is to code required functionality in Java such as CREATE OR REPLACE FUNCTON java_pkg AS FUNCTION phone_fmt (p_phone IN VARCHAR2) RETURN VARCHAR2 IS LANGUAGE JAVA NAME 'JavaPackageName.JavaClassName.getString (char[]) return char[]'; END; / /* contents of JavaPackageName.JavaClassName */ package JavaPackageName; public class JavaClassName { public String aString=new String("fubar"); public JavaClassName() { ; } //default constructor public JavaClassName(char[] aString) //constructor with 1 string arg { System.out.println("JavaClassname has one input which is a String contents="+aString); } public getString(char[] input_string) { this.aString = new java.lang.String(input_string); return this.aString; } } HTH Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 26 Feb 2009 22:36:56 -0800 From: abr_ora@xxxxxxxxx Subject: PostgreSQL to Oracle To: pgsql-general@xxxxxxxxxxxxxx Hi All, I want to migrate from PostgreSQL to Oracle and need any tool preferably open source. And I am specially concerned with stored procedures / functions. Regards, Abdul Rehman. Windows Live™ Hotmail®…more than just e-mail. See how it works. |