I have a source code querying an Oracle database.
Is it possible to replace the Oracle database by a PostgreSQL database without modifying the source code ?
I thought about adding an adapter/wrapper module between my source code and the PostgreSQL db for the source code to be compatible with PostgreSQL.
Thanks
PostgreSQL is strict about ISO SQL standard implementation. Most recent Oracle versions are also compliant. Oracle usually implemented some feature long before it was standardized therefor their dialects is slightly different. Nowadays various SQL features have duplicate implementation in Oracle, an original one a ISO one.
Look Ora2pg, is this a Perl code which can convert a lot of Oracle code into Postgres.
Try to modify your Oracle code in Oracle database to be ISO SQL compliant, even before starting actual migration. Such a code can run on both databases without any changes.
Then you finally move from Oracle to Postgres