Skip to content

Commit

Permalink
Changed oracle view to use all_tab_columns instead of dba sys table. …
Browse files Browse the repository at this point in the history
…Updated README
  • Loading branch information
keithf4 committed Feb 2, 2012
1 parent 2ecb768 commit 0cadf97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README
@@ -1,8 +1,8 @@
This set of functions is for creating materialized view snapshots on PostgreSQL from an Oracle database using the Oracle Foreign Data Wrapper (http://oracle-fdw.projects.postgresql.org).

This was made to replace a replication system currently in place using dbi_link between an old Oracle 8i system and PostgreSQL 9.1. The Oracle setup file is only known to work with 8i. If anyone else can supply setup files for more modern versions of Oracle, that would be appreciated.
This was made to replace a replication system currently in place using dbi_link between an old Oracle 8i system and PostgreSQL 9.1. The Oracle setup file is only known for certain to work with 8i. If anyone else can supply setup files (or confirm this file works) for more modern versions of Oracle, that would be appreciated.

NOTE: You will have to edit setup_pg.sql to set the FDW server name and the schema where the oracle view is located for your systems.
NOTE: You will have to edit setup_pg.sql to set the FDW server name and the schema where the oracle view is located for your systems. Also, the oracle setup file is using the ALL_TAB_COLUMNS system view. This only shows columns for tables that are accessible to the Oracle user you are using. If you want to be able to see all columns for all ables, you can try DBA_TAB_COLUMNS instead, but you'll need special permissions set for the Oracle user.

create_oracle_fdw_table('OWNER.TABLENAME') - Function for creating an FDW table. If you comment out 'EXECUTE v_insert_sql' near the bottom, this function can be used as a standalone function for easily creating FDW tables.

Expand Down
2 changes: 1 addition & 1 deletion setup_oracle8i.sql
@@ -1 +1 @@
CREATE VIEW PG_FDW_TABLE_COLUMNS AS select owner, table_name, column_name, data_type, data_length, column_id from dba_tab_columns;
CREATE OR REPLACE VIEW PG_FDW_TABLE_COLUMNS AS SELECT owner, table_name, column_name, data_type, data_length, column_id FROM all_tab_columns;

0 comments on commit 0cadf97

Please sign in to comment.