pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pg_gg@mailinator.com
To: pgsql-odbc@postgresql.org
Subject: Postgresql ODBC Truncates Timestamp second fractions
Date: Sat, 05 Apr 2014 20:50:26 +0200
Message-ID: <E1WWVfe-0001TR-3o@free.hostodon.me> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

<p>Hi</p>

<p>We are trying to replicate data from an Oracle database to PG 9.3 (tried 9.2 as well, but that doesn&#39;t really make a difference) on Windows 2008R2 64-bit using Oracle GoldenGate (OGG), but running into an issue with the ODBC driver psqlodbc-09.03.0210. The problem is that timestamp values coming from Oracle are truncated and mili and micro second data is lost. For example if data is &#39;2014-04-05 11:12:13.123456000&#39; what is insertedin the PG table is &#39;2014-04-05 11:12:13&#39;, even when the field is defined as timestamp or timestamp (6). We logged the queries and it appears that the parameter that is prepared is already truncated to seconds only. We only see this behaviour with OGG, and not through other methods of inserting data using the same ODBC connection. However, the ODBC driver that ships with OGG, which is from DataDirect, doesn&#39;t have this problem and passes the timestamp values appropriately. However we cannot use that driver, as it doesn&#39;t handle unicode null character, i.e. 0x00, which the official PG ODBC driver somehow handles. So basically none of the drivers work properly, but each has it&#39;s own separate issue. We are trying to figure out where in the psqlodbc codes the preparation and conversion of parameters happen to find out why the timestamp values are truncated if the data is coming from OGG and not truncated from other mechansims. Any help with this regard is greatly appreciated.</p>

<p>Thank you<br />
A.</p>





view thread (6+ messages)  latest in thread

Message-ID: <E1WWVfe-0001TR-3o@free.hostodon.me>
Permalink:  ../E1WWVfe-0001TR-3o@free.hostodon.me/
Also on:    postgresql.org/message-id/E1WWVfe-0001TR-3o@free.hostodon.me

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: pg_gg@mailinator.com
  Subject: Re: Postgresql ODBC Truncates Timestamp second fractions
  In-Reply-To: <E1WWVfe-0001TR-3o@free.hostodon.me>
  References: <E1WWVfe-0001TR-3o@free.hostodon.me>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox