Re: Connecting to Oracle from Postgresql 9.2 on Windows

From: Christian Ullrich <chris(at)chrullrich(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: rgullstrom(at)gmail(dot)com
Subject: Re: Connecting to Oracle from Postgresql 9.2 on Windows
Date: 2013-11-05 22:33:27
Message-ID: 52797237.9050704@chrullrich.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

* Albe Laurenz wrote:

> It should work on 64-bit Windows, but I have no such machine to build it.
> I'd be happy to publish binaries if somebody can build them.

Every time I go up against what passes for a PostgreSQL build system on
Windows, I am pleasantly surprised that it is not half as fragile as it
looks.

I now have working 64-bit builds of oracle_fdw.dll for both 9.2 and 9.3,
built against the respective git branches. The only thing is, I'm not at
all conversant with the build environment required for portable
extension modules. I have been using Visual Studio 2012; do I have to
build with 2008 to avoid runtime library clashes, or is that not an
issue here?

Rune, if you want to try my DLLs, I'll be happy to send them to you.

postgres=# select version();
version
-------------------------------------------------------------
PostgreSQL 9.3.1, compiled by Visual C++ build 1700, 64-bit
(1 row)

postgres=# create extension oracle_fdw;
CREATE EXTENSION
postgres=# create server oradb foreign data wrapper oracle_fdw options
(dbserver '//oracle.local/orcl');
CREATE SERVER
postgres=# create user mapping for postgres server oradb options (user
'hr', password 'hr');
CREATE USER MAPPING
postgres=# create foreign table oradepts (department_id integer not
null, department_name varchar(30) not null, manager_id integer,
location_id integer) server oradb options (table 'DEPARTMENTS');
CREATE FOREIGN TABLE
postgres=# select * from oradepts;
department_id | department_name | manager_id | location_id
---------------+----------------------+------------+-------------
10 | Administration | 200 | 1700
20 | Marketing | 201 | 1800
30 | Purchasing | 114 | 1700
40 | Human Resources | 203 | 2400
50 | Shipping | 121 | 1500
60 | IT | 103 | 1400
...

--
Christian

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2013-11-06 08:42:05 Re: Connecting to Oracle from Postgresql 9.2 on Windows
Previous Message Steve Crawford 2013-11-05 18:01:30 Re: Backup and restore postgreSQL