Thread: Oracle Functions to PostgreSQL

Oracle Functions to PostgreSQL

From
Abdul Rahman
Date:
Hi all,

Is there any preferably open source tool to convert Oracle Functions to PostgreSQL Functions.

Thanks,
Abdul Rehman.

Re: Oracle Functions to PostgreSQL

From
"A. Kretschmer"
Date:
In response to Abdul Rahman :
> Hi all,
>
> Is there any preferably open source tool to convert Oracle Functions to
> PostgreSQL Functions.

Maybe orafce, see http://pgfoundry.org/projects/orafce/


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

Re: Oracle Functions to PostgreSQL

From
Bruce Momjian
Date:
Abdul Rahman wrote:
> Hi all,
>
> Is there any preferably open source tool to convert Oracle
> Functions to PostgreSQL Functions.

No, not that I know of.  I assume you mean user-created functions.
There is orafce for adding Oracle functions to Postgres.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: Oracle Functions to PostgreSQL

From
Martin Gainty
Date:
you're going to have alot of work as ANNOTATIONS and DATATYPES are different e.g.

--------------- Postgres function which calcs geo_distance
CREATE OR REPLACE FUNCTION geo_distance (point, point)
RETURNS float8
LANGUAGE 'C' IMMUTABLE STRICT AS '$libdir/earthdistance';

--Oracle has no clue what points or float8 might be so you'll have to convert to
--known Oracle Datatypes or packaged objects
NUMBER,VARCHAR2,CHAR,DATE,BLOB,CLOB

IMMUTABLE can be accomplished if you birth the functionality to a Java Class and add @Immutable
CREATE OR REPLACE PACKAGE Function_Container AS
 FUNCTION JavaFunction
 (AOracleDatatype IN VARCHAR2)
 RETURN VARCHAR2
IS
LANGUAGE 'JAVA'
NAME 'package.ImmutableProjectToAccomplishAOracleFunction' (char[]) return char[]';
/

Here is the Java file
package package;
@Immutable
public class ImmutableProjectToAccomplishAOracleFunction { }
--STRICT is only available in Oracle11

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: Tue, 24 Feb 2009 04:46:30 -0800
From: abr_ora@yahoo.com
Subject: [GENERAL] Oracle Functions to PostgreSQL
To: pgsql-general@postgresql.org

.ExternalClass DIV {;}
Hi all,

Is there any preferably open source tool to convert Oracle Functions to PostgreSQL Functions.

Thanks,
Abdul Rehman.



Windows Live™ Hotmail®:…more than just e-mail. Check it out.