oracle_fdw
oracle_fdw : foreign data wrapper for Oracle access
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 8610 | oracle_fdw | oracle_fdw | 2.9.0 |
FDW | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | mysql_fdw tds_fdw db2_fdw sqlite_fdw firebird_fdw informix_fdw postgres_fdw orafce db2fce db_migrator |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 2.9.0 |
18 17 16 15 14 | oracle_fdw |
- |
| RPM | PGDG | 2.9.0 |
18 17 16 15 14 | oracle_fdw_$v |
- |
| DEB | PGDG | 2.9.0 |
18 17 16 15 14 | postgresql-$v-oracle-fdw |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| el8.aarch64 | N/A | N/A | N/A | N/A | N/A |
| el9.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| el9.aarch64 | N/A | N/A | N/A | N/A | N/A |
| el10.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| el10.aarch64 | N/A | N/A | N/A | N/A | N/A |
| d12.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| d12.aarch64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| d13.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| d13.aarch64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| u22.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| u22.aarch64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| u24.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| u24.aarch64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| u26.x86_64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
| u26.aarch64 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 | PGDG 2.9.0 |
Source
github.com/laurenz/oracle_fdw
oracle_fdw-ORACLE_FDW_2_8_0.tar.gz
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
Usage
Create Server
Server Options: dbserver (required, Oracle connection string), isolation_level (serializable, read_committed, or read_only, default serializable), nchar (expensive character conversion, default off), set_timezone (sync timezone with Oracle, default off).
Create User Mapping
Use an empty string for user to enable external (OS) authentication.
Create Foreign Table
Table Options: table (required, Oracle table name in uppercase), schema (table owner), dblink (Oracle DB link), max_long (max LONG column length, default 32767), readonly (default false), sample_percent (ANALYZE sampling, default 100), prefetch (rows per round-trip, default 50).
Column Options: key (mark as primary key, required for UPDATE/DELETE), strip_zeros (remove ASCII 0 from strings).
You can also use a query instead of a table name by enclosing it in parentheses:
Import Foreign Schema
Import Options: case (keep, lower, or smart, default smart), readonly, skip_tables, skip_views, skip_matviews, max_long, sample_percent, prefetch.
Utility Functions
Data Type Mapping
| Oracle Type | PostgreSQL Types |
|---|---|
| CHAR, VARCHAR2, NVARCHAR2 | char, varchar, text |
| CLOB, NCLOB | text, json |
| NUMBER | numeric, float4, float8, int2, int4, int8, boolean |
| DATE, TIMESTAMP | date, timestamp, timestamptz |
| BLOB, LONG RAW | bytea |
| XMLTYPE | xml, text |
| SDO_GEOMETRY | geometry (PostGIS) |