Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aOg7r-0001er-4c for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 06:32:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aOg7q-00020o-NU for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 06:32:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOg7o-0001zM-OX for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 06:32:13 +0000 Received: from mailuogwdur.emc.com ([128.221.224.79]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOg7l-00063n-JS for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 06:32:11 +0000 Received: from maildlpprd52.lss.emc.com (maildlpprd52.lss.emc.com [10.106.48.156]) by mailuogwprd51.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u0S6W8JX020919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 28 Jan 2016 01:32:08 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com u0S6W8JX020919 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=emc.com; s=jan2013; t=1453962728; bh=v5sTlpMGl/tSdr56k/DPlBdhlTE=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=Fafzj84mh6aCIlRujjY0+26XqOqg+bZSRRzH+m0FtgQXkzEQn+DcHlN8aP3B/pEf3 wwatT3CK/m7ur2Hl7z4YxCD/pxqOSJyQThUFLH7gPlh9zqOePMSNi/EbexXh1ODAGq BXx1Yw05/iyFbBI1BmJDwT12fgyPVIIjwhicdJU4= X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com u0S6W8JX020919 Received: from mailusrhubprd01.lss.emc.com (mailusrhubprd01.lss.emc.com [10.253.24.19]) by maildlpprd52.lss.emc.com (RSA Interceptor) for ; Thu, 28 Jan 2016 01:31:38 -0500 Received: from MXHUB208.corp.emc.com (MXHUB208.corp.emc.com [10.253.68.34]) by mailusrhubprd01.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u0S6VrDN001924 (version=TLSv1.2 cipher=AES128-SHA256 bits=128 verify=FAIL) for ; Thu, 28 Jan 2016 01:31:53 -0500 Received: from MX105CL01.corp.emc.com ([fe80::e020:347b:74e3:4176]) by MXHUB208.corp.emc.com ([10.253.68.34]) with mapi id 14.03.0266.001; Thu, 28 Jan 2016 01:31:53 -0500 From: "Venkatesan, Sekhar" To: "pgsql-sql@postgresql.org" Subject: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! Thread-Topic: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! Thread-Index: AdFZlKwYGssRJphmQLWh8p8v4os3FA== Date: Thu, 28 Jan 2016 06:31:52 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.30.85.101] Content-Type: multipart/alternative; boundary="_000_F84DE43FDACD4C45AA84E2DA016FAE2F1C65A5FCMX105CL01corpem_" MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd01.lss.emc.com X-RSA-Classifications: public X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org --_000_F84DE43FDACD4C45AA84E2DA016FAE2F1C65A5FCMX105CL01corpem_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, I am trying to certify our product with PostgreSQL database and facing an = issue with windows odbc driver and need your help to identify the problem. Our application uses SQLDriverConnect to connect to PostgreSQL server. I am= using PostgreSQL odbc driver version 9.4 SQLSetConnectAttr to enable autocommit as below: Eg: SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON, 0) But it seems autocommit is not set and hence any queries executed from othe= r session never gets updated data in other session since autocommit of inse= rt statements never happens. Only workaround I am seeing is to explicitly issue "commit" to save the upd= ates in the database. Has anyone seen this issue earlier? I see a relevant issue in psqlODBC 09.0= 5.0100 Release something like below: https://odbc.postgresql.org/docs/release.html 1. Don't reset autocommit when a connection is established If autocommit is disabled on a connection, by calling SQLSetConnectAttr(SQL= _ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, 0), before connecting with SQLDriverC= onnect(), autocommit was incorrectly reset back to on when the connection w= as established. Is the above issue fixed? Also in my use-case, I want to enable autocommit = at odbc driver level but even that doesn't work. The same application works in Linux OS when unix odbc driver is used. This = seems to be specific to windows driver. Please shed some light on this. Do ask me further question if you have any. Thanks, Sekhar --_000_F84DE43FDACD4C45AA84E2DA016FAE2F1C65A5FCMX105CL01corpem_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi All,

 

I am trying  to certify our product with Postgr= eSQL database and facing an issue with windows odbc driver and need your he= lp to identify the problem.

Our application uses SQLDriverConnect to connect to = PostgreSQL server. I am using PostgreSQL odbc driver version 9.4=

SQLSetConnectAttr to ena= ble autocommit as below:

Eg: SQLSetConnectAttr(SQ= L_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_ON, 0)

 =

But it seems autocommit is not set and hence any que= ries executed from other session never gets updated data in other session s= ince autocommit of insert statements never happens.

Only workaround I am seeing is to explicitly issue &= #8220;commit” to save the updates in the database.

 

Has anyone seen this issue earlier? I see a relevant= issue in psqlODBC 09.05.0100 Release something like below:

https://odbc.postgresql.org/docs/release.html

1.  =    Don't reset a= utocommit when a connection is established

If autocommit is disabled on a connection, by calling SQLSetConnectAttr(= SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF, 0), before connecting with SQLDriverConnect(), autocommit was incorrectly reset back to on when = the connection was established.

 

Is the above issue fixed? Also in my use-case, I wan= t to enable autocommit at odbc driver level but even that doesn’t wor= k.

The same application works in Linux OS when unix odb= c driver is used. This seems to be specific to windows driver.

 

Please shed some light on this. Do ask me further qu= estion if you have any.

 

Thanks,

Sekhar

--_000_F84DE43FDACD4C45AA84E2DA016FAE2F1C65A5FCMX105CL01corpem_--