Re: Problem with postgres 9.6 ODBC drivers

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: "Pandian, Jegan" <Jegan(dot)Pandian(at)dell(dot)com>, "pgsql-odbc-owner(at)postgresql(dot)org" <pgsql-odbc-owner(at)postgresql(dot)org>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Cc: "Durairaj, Visva" <Visva(dot)Durairaj(at)dell(dot)com>
Subject: Re: Problem with postgres 9.6 ODBC drivers
Date: 2017-04-19 00:38:14
Message-ID: ec80efce-c4f0-7317-de8a-ca851b34cffb@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

Your previous email reached today unfortunately.
I will examine the issue.

regards,
Hiroshi Inoue

On 2017/04/17 20:11, Pandian, Jegan wrote:
>
> Team,
>
> Can you please help us on this, as we were not able to continue our
> further testing with 09.06 Windows ODBC drivers.
>
> Thanks,
> Jegan
>
> *From:*Pandian, Jegan
> *Sent:* Tuesday, April 11, 2017 1:24 PM
> *To:* 'pgsql-odbc-owner(at)postgresql(dot)org'
> *Subject:* Problem with postgres 9.6 ODBC drivers
>
> Hi Postgres ODBC team,
>
> Our application is failing with the latest windows odbc (postgres)
> drivers, because it’s not updating sequence table at al.
>
> So we will always get the same id when we try to create any new
> object, ending up in unique constraint violation error.
>
> Debugged postgres odbc driver code
> (https://www.postgresql.org/ftp/odbc/versions/src/) and found the below:
>
> File: results.c
>
> Method: *static void KeySetSet(const TupleField *tuple, int
> num_fields, int num_key_fields, KeySet *keyset)*
>
> Problematic change: *keyset->status = 0;*
>
> We will execute all queries with status 1024, now for some reason
> status has been re-initialized to 0. Because of this, update call
> itself is not getting invoked(code below)
>
> *spos_callback* function:
>
> *#define CURS_IN_ROWSET (1L << 10)*
>
> *if (0 == (res->keyset[kres_ridx].status & CURS_IN_ROWSET))*
>
> * continue;*
>
> status: 34
>
> CURS_IN_ROWSET: 1024
>
> 34 & 1024 => 0
>
> If the status was not reset, then keyset[kres-ridex].status will be
> 1024+ 34 => 1058 (behavior for 9.4 and 9.5 drivers), so will do the
> update properly.
>
> We need your help to find out why this has been changed in the latest
> drivers? Is there any specific reason behind this? Is this a bug/any
> workaround to overcome it?
>
> Thanks,
> Jegan
>

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Mehmet Keleş 2017-04-19 03:21:22 Ynt: Server Closed the connection unexpectedly
Previous Message Adrian Klaver 2017-04-18 19:37:56 Re: Server Closed the connection unexpectedly