oracle_fdw
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
oracle_fdw | 2.9.0 | FDW | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 8610 | oracle_fdw | No | Yes | No | Yes | No | No | - |
| Related | mysql_fdw tds_fdw db2_fdw sqlite_fdw firebird_fdw informix_fdw postgres_fdw orafce db2fce db_migrator |
|---|
require oracle-libs
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 2.9.0 | 1817161514 | oracle_fdw | - |
| RPM | PGDG | 2.9.0 | 1817161514 | oracle_fdw_$v | - |
| DEB | PGDG | 2.9.0 | 1817161514 | postgresql-$v-oracle-fdw | - |
Install
You can install oracle_fdw directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
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) |
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)