Foreign Data Wrapper from Oracle to Postgres 16
Hi team,
I am working on a project along with my peers on developing an Foreign Data
Wrapper to transfer data from Oracle to Postgres 16. We followed the below
steps in order:
1. Developed the Foreign Data Wrapper (64-bit) using Microsoft Visual
Studio to transfer from Oracle to Postgres 16
2. Installed Oracle Instant Client 64-bit versionand InstantClient Path has
been set in the environment variables
3. Have Postgres 16 64-bit version installed
4. Placed all the files from each folder of the downloaded ORACLE_FDW
package should be copied into the respective folders of PostgreSQL
Installation directory
5. “oci.dll” from the Oracle Instant Client Installation directory to
PostgreSQL Installation directory
6. Visual C++ redistributable is installed
After the above steps when we try to execute the below statement in
Postgres 16
CREATE EXTENSION IF NOT EXISTS oracle_fdw
SCHEMA public
VERSION "1.2"
we get the error "SQL Error [58P01]: ERROR: could not load library
"C:/Program Files/PostgreSQL/16/lib/oracle_fdw.dll": The specified module
could not be found.
Error position"
But we are able to execute the above command successfully in Postgres 13
and successfully transfer data from Oracle to Postgres 13.
Any help or direction would be greatly helpful.
Regards
Santhosh S
On Wed, 2025-07-02 at 23:58 +0530, Santhosh S wrote:
I am working on a project along with my peers on developing an Foreign Data Wrapper
to transfer data from Oracle to Postgres 16. We followed the below steps in order:1. Developed the Foreign Data Wrapper (64-bit) using Microsoft Visual Studio to transfer from Oracle to Postgres 16
2. Installed Oracle Instant Client 64-bit versionand InstantClient Path has been set in the environment variables
3. Have Postgres 16 64-bit version installed
4. Placed all the files from each folder of the downloaded ORACLE_FDW package should
be copied into the respective folders of PostgreSQL Installation directory
5. “oci.dll” from the Oracle Instant Client Installation directory to PostgreSQL Installation directory
6. Visual C++ redistributable is installedAfter the above steps when we try to execute the below statement in Postgres 16
CREATE EXTENSION IF NOT EXISTS oracle_fdw
SCHEMA public
VERSION "1.2"we get the error "SQL Error [58P01]: ERROR: could not load library "C:/Program Files/PostgreSQL/16/lib/oracle_fdw.dll": The specified module could not be found.
Error position"But we are able to execute the above command successfully in Postgres 13 and successfully transfer data from Oracle to Postgres 13.
Any help or direction would be greatly helpful.
This is better tracked here: https://github.com/laurenz/oracle_fdw/issues/754
By the way, I took a double take when I read your report.
For me "developing" a FDW means writing the code, whereas you are clearly
talking about what I would call "building", "compiling" or "instaling"
the FDW. No problem, I just want to avoid confusion.
Yours,
Laurenz Albe
Hi,
We found a link that may help resolve the issue you encountered while creating the oracle_fdw extension on windows machine.
laurenz/oracle_fdw: PostgreSQL Foreign Data Wrapper for Oracle<https://github.com/laurenz/oracle_fdw?tab=readme-ov-file#6-installation>
[https://opengraph.githubassets.com/5ddf3cfa010c4132953bb148ce5b719f099b54771a4898555db8946528da016a/laurenz/oracle_fdw]<https://github.com/laurenz/oracle_fdw?tab=readme-ov-file#6-installation>
GitHub - laurenz/oracle_fdw: PostgreSQL Foreign Data Wrapper for Oracle<https://github.com/laurenz/oracle_fdw?tab=readme-ov-file#6-installation>
PostgreSQL Foreign Data Wrapper for Oracle. Contribute to laurenz/oracle_fdw development by creating an account on GitHub.
github.com
Thanks
Dinesh Nair
________________________________
From: Laurenz Albe <laurenz.albe@cybertec.at>
Sent: Thursday, July 3, 2025 12:20 PM
To: Santhosh S <sansel25041991@gmail.com>; pgsql-general@postgresql.org <pgsql-general@postgresql.org>; pgsql-novice@postgresql.org <pgsql-novice@postgresql.org>
Subject: Re: Foreign Data Wrapper from Oracle to Postgres 16
Caution: This email was sent from an external source. Please verify the sender’s identity before clicking links or opening attachments.
On Wed, 2025-07-02 at 23:58 +0530, Santhosh S wrote:
I am working on a project along with my peers on developing an Foreign Data Wrapper
to transfer data from Oracle to Postgres 16. We followed the below steps in order:1. Developed the Foreign Data Wrapper (64-bit) using Microsoft Visual Studio to transfer from Oracle to Postgres 16
2. Installed Oracle Instant Client 64-bit versionand InstantClient Path has been set in the environment variables
3. Have Postgres 16 64-bit version installed
4. Placed all the files from each folder of the downloaded ORACLE_FDW package should
be copied into the respective folders of PostgreSQL Installation directory
5. “oci.dll” from the Oracle Instant Client Installation directory to PostgreSQL Installation directory
6. Visual C++ redistributable is installedAfter the above steps when we try to execute the below statement in Postgres 16
CREATE EXTENSION IF NOT EXISTS oracle_fdw
SCHEMA public
VERSION "1.2"we get the error "SQL Error [58P01]: ERROR: could not load library "C:/Program Files/PostgreSQL/16/lib/oracle_fdw.dll": The specified module could not be found.
Error position"But we are able to execute the above command successfully in Postgres 13 and successfully transfer data from Oracle to Postgres 13.
Any help or direction would be greatly helpful.
By the way, I took a double take when I read your report.
For me "developing" a FDW means writing the code, whereas you are clearly
talking about what I would call "building", "compiling" or "instaling"
the FDW. No problem, I just want to avoid confusion.
Yours,
Laurenz Albe