Giter Club home page Giter Club logo

Comments (3)

processor286 avatar processor286 commented on August 14, 2024

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.

laurenz avatar laurenz commented on August 14, 2024

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.

processor286 avatar processor286 commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.