Comments (3)
The JAVA (JDBC) fdw fails with the same error.
I guess it's not an oracle_fdw problem.
The problem actually appears to be that when you do this:
==> create foreign table tib (INCIDENT_ID numeric) server rac options (schema 'GC',table 'TIB');
it doesn't in fact operate the conversion on the INCIDENT_ID (second) column, but on the FIRST column, which is a DATE type. DATE can't be converted to NUMERIC so it fails.
As this happens in the JDBC one as well, either I'm misunderstanding how this is supposed to work, or there's something in the foreign table mechanism that's always starting from the first column and going by position, rather than by matching column names.
from oracle_fdw.
Your suspicion is right; oracle_fdw does not match columns by name, but rather by column position.
The main reason is that PostgreSQL 9.1 (which is supported by oracle_fdw) does not allow column options,
and automatic matching of names is difficult (because Oracle's names default to upper case, while
PostgreSQL's default to lower case).
I have documented that in the README, did you find the description misleading or insufficient?
As a workaround I recommend that you create a foreign table with two columns and use the second,
but your solution with a view on the Oracle side is just as good.
Yours,
Laurenz Albe
from oracle_fdw.
Sorry, I only just found the part in the README that says it's mapped by position.
I think my comprehension problem comes from the example seeming to imply a name mapping (well, to me anyway).
Sorry for the issue, you can close this.
from oracle_fdw.
Related Issues (20)
- `IMPORT FOREIFN SCHEMA` new `import_views` option HOT 2
- What operational system are supported by Oracle FDW ? Error when compiling in Oracle Linux 9.3 HOT 3
- Oracle_fdw installation issue HOT 11
- `IMPORT FOREIFN SCHEMA don't transfer comments from Oracle HOT 21
- Conversion between Oracle DATE and PostgreSQL TIMESTAMP HOT 9
- Query to Oracle when there are geometry conditions implies that all table are loaded in PostgreSQL. HOT 3
- Not able to create extension oracle_fdw HOT 3
- Help With ORA-08177: can't serialize access for this transaction HOT 3
- Oracle_fdw takes a long time to query data and has slow query efficiency HOT 8
- system user mapping example HOT 5
- oracle_fdw make command fails with : *** [<builtin>: oracle_utils.o] Error 1 HOT 7
- Unable to setup oracle_fdw HOT 11
- Oracle_fdw installation passes but with warnings during "make" command HOT 2
- The working principle of oracle_fdw? HOT 7
- Conversion between Oracle DATE and PostgreSQL TIMESTAMP (lost time part) HOT 11
- Import Foreign Schema -> Error Duplicate column "id" HOT 8
- prefetch - allowed values range HOT 16
- Sessions getting stuck at active while inserting from oracle to postgres HOT 14
- make faild HOT 9
- Unable to get the header files for windows environment HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oracle_fdw.