Run Query Across Oracle and Postgres We are in the process of migrating all our data from Oracle DB (12c Enterprise Edition Release 12.1.0.2.0) to Postgres (9.4.9). We are half way through the migration process and it is going to take a while to migrate all the tables. A SQL I have requires JOINs and sub-queries on tables across these two different DBs.

The obvious solution is to write a script that runs queries separately on these databases and combines the results in code. 

Is there an easier alternative to this?
This is what foreign data wrappers are for. 

There is one FDW for Oracle: https://laurenz.github.io/oracle_fdw/

A complete(?) list of available FDWs can be found in the Postgres Wiki: https://wiki.postgresql.org/wiki/FDW

See also CREATE FOREIGN TABLE