oracle_fdw
error desc:
postgres=# select * from test;
ERROR: Oracle table "sangli"."test" for foreign table "test" does not exist or does not allow read access
DETAIL: ORA-00942: table or view does not exist
HINT: Oracle table names are case sensitive (normally all uppercase).
#create server
CREATE SERVER oradb FOREIGN DATA WRAPPER oracle_fdw OPTIONS (dbserver \'//127.0.0.1/orcl\'); GRANT USAGE ON FOREIGN SERVER oradb TO postgres; CREATE USER MAPPING FOR postgres SERVER oradb OPTIONS (user \'sangli\', password \'sangli\'); CREATE FOREIGN TABLE TEST ( id int OPTIONS (key \'true\') NOT NULL, name text)
SERVER oradb OPTIONS (SCHEMA \'SANGLI\', TABLE \'TEST\');
红色字体必须为大写,否则。。就会上面的error。