Postgresql ODBC Truncates Timestamp second fractions - Mailing list pgsql-odbc

From pg_gg@mailinator.com
Subject Postgresql ODBC Truncates Timestamp second fractions
Date
Msg-id E1WWVfe-0001TR-3o@free.hostodon.me
Whole thread Raw
Responses Re: Postgresql ODBC Truncates Timestamp second fractions  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-odbc
<p>Hi<p>We are trying to replicate data from an Oracle database to PG 9.3 (tried 9.2 as well, but that doesn't really
makea difference) on Windows 2008R2 64-bit using Oracle GoldenGate (OGG), but running into an issue with the ODBC
driverpsqlodbc-09.03.0210. The problem is that timestamp values coming from Oracle are truncated and mili and micro
seconddata is lost. For example if data is '2014-04-05 11:12:13.123456000' what is insertedin the PG table is
'2014-04-0511:12:13', even when the field is defined as timestamp or timestamp (6). We logged the queries and it
appearsthat the parameter that is prepared is already truncated to seconds only. We only see this behaviour with OGG,
andnot through other methods of inserting data using the same ODBC connection. However, the ODBC driver that ships with
OGG,which is from DataDirect, doesn't have this problem and passes the timestamp values appropriately. However we
cannotuse that driver, as it doesn't handle unicode null character, i.e. 0x00, which the official PG ODBC driver
somehowhandles. So basically none of the drivers work properly, but each has it's own separate issue. We are trying to
figureout where in the psqlodbc codes the preparation and conversion of parameters happen to find out why the timestamp
valuesare truncated if the data is coming from OGG and not truncated from other mechansims. Any help with this regard
isgreatly appreciated.<p>Thank you<br /> A. 

pgsql-odbc by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Communication error while getting a tuple
Next
From: Adrian Klaver
Date:
Subject: Re: Postgresql ODBC Truncates Timestamp second fractions