Porting Oracle Applications to PostgreSQL
This presentation was written by a PostgreSQL expert, not an Oracle expert. Both Oracle and PostgreSQL are diverse, complex, and moving targets. Both Oracle and PostgreSQL are (probably) Turing-complete, so almost anything is “possible”, but we are looking for reasonable options.
Porting projects are hard. Compatibility and compatibility layers are an illusion. It might be better not to do it. But success can be very rewarding.
Identifiers Oracle case folds to upper case, PostgreSQL to lower case. Big trouble if you mix quoted and unquoted identifiers. Column aliases SELECT foo [AS] bar — Most Oracle applications omit the AS, but PostgreSQL requires it. Fixed in PostgreSQL 8.4. MINUS Change to EXCEPT. SQL key words Usually not a big problem, but should be kept in mind. “FROM dual” Easy to work around (or use orafce)
Both Oracle and PostgreSQL support plenty of SQL-conforming data types. But usually the nonconforming ones are in wider use. Thin compatibility layers can usually help, but that will make your PostgreSQL application unpretty. A big search-and-replace is usually in order.

Leave a Reply
You must be logged in to post a comment.