Giter Club home page Giter Club logo

Comments (7)

laurenz avatar laurenz commented on August 14, 2024

Sorry for the inconvenience.

Could you tell me the timestamp value that causes the error?

from oracle_fdw.

dszczyt avatar dszczyt commented on August 14, 2024

Oracle SQL Dev Tool shows me values like : 28/03/14 17:56:10,863000000

First tried with import schema, giving this error. I tried to map into a character varying(255) in postgresql, same issue. It worked fine in postgresql 9.4.

from oracle_fdw.

laurenz avatar laurenz commented on August 14, 2024

Hmm, it works for me.

In Oracle:

SQL> CREATE TABLE tstest (id NUMBER(5) PRIMARY KEY, ts TIMESTAMP(6) NOT NULL);
SQL> INSERT INTO tstest (id, ts) VALUES (1, to_timestamp('2014-03-28 17:56:10.863000000', 'YYYY-MM-DD HH24:MI:SS.FF'));
SQL> COMMIT;

In PostgreSQL:

test=> CREATE FOREIGN TABLE tstest (id integer NOT NULL, ts timestamp(6) NOT NULL) SERVER oracle OPTIONS (table 'TSTEST');
test=> SELECT * FROM tstest;
┌────┬─────────────────────────┐
│ id │           ts            │
├────┼─────────────────────────┤
│  1 │ 2014-03-28 17:56:10.863 │
└────┴─────────────────────────┘
(1 row)

Could you tell me the exact hex value of the Oracle date field?
You can get it with the DUMP function, in my example like this:

SQL> SELECT dump(ts, 16) FROM tstest WHERE id = 1;
DUMP(TS,16)
--------------------------------------------------------------------------------
Typ=180 Len=11: 78,72,3,1c,12,39,b,33,70,55,c0

Alternatively, can you come up with a sequence of SQL statements to reproduce the problem?

from oracle_fdw.

dszczyt avatar dszczyt commented on August 14, 2024

Here is the result :

Typ=180 Len=11: 78,72,3,1c,12,39,b,33,70,55,c0

So same value as yours. Did you run your tests with postgresql 9.5 ?

from oracle_fdw.

laurenz avatar laurenz commented on August 14, 2024

Ok, I can reproduce the error now, but only with lc_messages = fr_FR.UTF-8.
I'll look into it.

from oracle_fdw.

laurenz avatar laurenz commented on August 14, 2024

I have pushed 3fa9d98 that should fix the problem.
Can you check?

from oracle_fdw.

dszczyt avatar dszczyt commented on August 14, 2024

👍 Fixed ! Thanks !

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.