PostgreSQL: Autocommit through windows odbc driver doesnt work!!! - Mailing list pgsql-sql

From Venkatesan, Sekhar
Subject PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
Date
Msg-id F84DE43FDACD4C45AA84E2DA016FAE2F1C65A5FC@MX105CL01.corp.emc.com
Whole thread Raw
Responses Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-sql
<div class="WordSection1"><p class="MsoNormal">Hi All,<p class="MsoNormal"> <p class="MsoNormal">I am trying  to
certifyour product with PostgreSQL database and facing an issue with windows odbc driver and need your help to identify
theproblem.<p class="MsoNormal">Our application uses SQLDriverConnect to connect to PostgreSQL server. I am using
PostgreSQLodbc driver version 9.4<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New
Roman","serif";color:black">SQLSetConnectAttrto enable autocommit as below:</span><p class="MsoNormal"><span
style="font-size:13.5pt;font-family:"TimesNew Roman","serif";color:black">Eg: SQLSetConnectAttr(SQL_ATTR_AUTOCOMMIT,
SQL_AUTOCOMMIT_ON,0)</span><p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Times New
Roman","serif";color:black"> </span><pclass="MsoNormal">But it seems autocommit is not set and hence any queries
executedfrom other session never gets updated data in other session since autocommit of insert statements never
happens.<pclass="MsoNormal">Only workaround I am seeing is to explicitly issue “commit” to save the updates in the
database.<pclass="MsoNormal"> <p class="MsoNormal">Has anyone seen this issue earlier? I see a relevant issue in
psqlODBC09.05.0100 Release something like below:<p class="MsoNormal"><a
href="https://odbc.postgresql.org/docs/release.html">https://odbc.postgresql.org/docs/release.html</a><p
class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in;text-indent:-.25in;mso-list:l0level1
lfo1"><spanstyle="font-size:13.5pt;font-family:"Times New Roman","serif";color:black"><span
style="mso-list:Ignore">1.<spanstyle="font:7.0pt "Times New Roman"">     </span></span></span><b><span
style="font-size:13.5pt;font-family:"TimesNew Roman","serif";color:black">Don't reset autocommit when a connection is
established</span></b><spanstyle="font-size:13.5pt;font-family:"Times New Roman","serif";color:black"></span><p
class="MsoNormal"style="margin-left:.5in"><span style="font-size:13.5pt;font-family:"Times New
Roman","serif";color:black">Ifautocommit 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
connectionwas established.</span><p class="MsoNormal"> <p class="MsoNormal">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.<p class="MsoNormal">The same
applicationworks in Linux OS when unix odbc driver is used. This seems to be specific to windows driver.<p
class="MsoNormal"> <pclass="MsoNormal">Please shed some light on this. Do ask me further question if you have any.<p
class="MsoNormal"> <pclass="MsoNormal">Thanks,<p class="MsoNormal">Sekhar</div> 

pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: filtering columns in function
Next
From: Adrian Klaver
Date:
Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!