Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WWeqN-0002s5-HJ for pgsql-odbc@arkaria.postgresql.org; Sun, 06 Apr 2014 04:38:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WWeqM-0001cS-Tt for pgsql-odbc@arkaria.postgresql.org; Sun, 06 Apr 2014 04:38:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WWeqL-0001cH-2M for pgsql-odbc@postgresql.org; Sun, 06 Apr 2014 04:38:05 +0000 Received: from [85.17.249.89] (helo=free.hostodon.me) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WWeqE-0005mj-60 for pgsql-odbc@postgresql.org; Sun, 06 Apr 2014 04:38:04 +0000 Received: from anonymou by free.hostodon.me with local (Exim 4.82) (envelope-from ) id 1WWeqB-00018c-LR for pgsql-odbc@postgresql.org; Sun, 06 Apr 2014 06:37:55 +0200 To: pgsql-odbc@postgresql.org Subject: Re: Postgresql ODBC Truncates Timestamp second fractions MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" From: pg_gg@mailinator.com Reply-To: Subject: Re: [ODBC] Postgresql ODBC Truncates Timestamp second fractions X-Mailer: Anonymous Email - http://anonymousemail.us Message-Id: Date: Sun, 06 Apr 2014 06:37:55 +0200 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - free.hostodon.me X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [511 510] / [47 12] X-AntiAbuse: Sender Address Domain - free.hostodon.me X-Get-Message-Sender-Via: free.hostodon.me: authenticated_id: anonymou/only user confirmed/virtual account not confirmed X-Host-Lookup-Failed: Reverse DNS lookup failed for 85.17.249.89 (failed) X-Pg-Spam-Score: 4.1 (++++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org

We have started with Oracle, but most probably they won't do much about it as their ODBC driver handles timestamps properly, but not the Unicode null character, which they have documented as a limitation, so it's hard to press them on that.

We were hoping to make it work by using the official PG ODBC driver, and this driver although handles the problem of null character, has the problem with timestamps.

Unfortunately I don't think I'm getting relevant answer to my question which is where we should look into the code to find out how the PG ODBC driver handles paramter conversion and specifically SQLDescribeParam and SQLBindParameter funnction calls.

Thanks anyway for your help.

On 04/05/2014 05:15 PM, pg_gg@mailinator.com wrote:
> I don't think the problem is only with the OGG. My understanding is that
> OGG polls the destination metadata first and then describes and prepares
> the parameters and the SQL statement based on the metadata. Either OGG
> interprets what it receives from PG differently than other tools, or the
> driver behaves differently for OGG, and that's what we are trying to
> understand based on the code. Just don't know where to look.

I would say, start with Oracle, it is their product. I am going to
assume support is part of the package. or am I wrong?

There is some evidence it does treat things differently:

http://docs.oracle.com/cd/E35209_01/doc.1121/e29642.pdf

"timestamptz data type
PostgreSQL
timestamp with timezone
column type is recognized as
SQL_VARCHAR
and therefore
Oracle GoldenGate writes the data in the native
format of the source
database, rather than
normalizing it to its PostgreSQL form. As a
result, some replicated timestamp data might
not be compatible with Oracle GoldenGate column-conversion functions and
FILTER
clauses."

>
> Also the DataDirect ODBC only handles timestamps when it's defined
> without a percision in which case the metadata query returns -1 for the
> field lenght. If precision is defined, even if it's 6 then it fails with
> the error mentioned in the link below and we would need to set the
> WorkArounds2=2. But that doesn't solve the problem because then it nags
> about data overflowing. So the only way to make the Data Driect drive to
> work is to not define the precision, but as I mentioned before, that
> driver doesn't handle Unicode null character, so we can't really use it.
>



--
Adrian Klaver
adrian.klaver@aklaver.com