agora inbox for pgsql-sql@postgresql.orghelp / color / mirror / Atom feed
PostgreSQL: Autocommit through windows odbc driver doesnt work!!! 5+ messages / 2 participants [nested] [flat]
* PostgreSQL: Autocommit through windows odbc driver doesnt work!!! @ 2016-01-28 06:31 Venkatesan, Sekhar <sekhar.venkatesan@emc.com> 0 siblings, 1 reply; 5+ messages in thread From: Venkatesan, Sekhar @ 2016-01-28 06:31 UTC (permalink / raw) To: pgsql-sql 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 other session never gets updated data in other session since autocommit of insert statements never happens. Only workaround I am seeing is to explicitly issue "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 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 SQLDriverConnect(), autocommit was incorrectly reset back to on when the connection was 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 ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! @ 2016-01-28 16:27 Adrian Klaver <adrian.klaver@aklaver.com> parent: Venkatesan, Sekhar <sekhar.venkatesan@emc.com> 0 siblings, 1 reply; 5+ messages in thread From: Adrian Klaver @ 2016-01-28 16:27 UTC (permalink / raw) To: Venkatesan, Sekhar <sekhar.venkatesan@emc.com>; pgsql-sql On 01/27/2016 10:31 PM, Venkatesan, Sekhar wrote: > 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 > other session never gets updated data in other session since autocommit > of insert statements never happens. > > Only workaround I am seeing is to explicitly issue “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 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 SQLDriverConnect(), autocommit was incorrectly reset > back to on when the connection was 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. The only answer I have is that you might get an answer sooner if you post this to the -odbc list: http://www.postgresql.org/list/pgsql-odbc/ > > Thanks, > > Sekhar > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! @ 2016-01-28 16:33 Venkatesan, Sekhar <sekhar.venkatesan@emc.com> parent: Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 1 reply; 5+ messages in thread From: Venkatesan, Sekhar @ 2016-01-28 16:33 UTC (permalink / raw) To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-sql Hi Adrian, Thanks for getting back to me. I am new to this forum. Can you please explain how to post my message in odbc list? How to contact this list there? Is there any email ID alias? Please help. Thanks, Sekhar -----Original Message----- From: Adrian Klaver [mailto:adrian.klaver@aklaver.com] Sent: Thursday, January 28, 2016 9:57 PM To: Venkatesan, Sekhar; pgsql-sql@postgresql.org Subject: Re: [SQL] PostgreSQL: Autocommit through windows odbc driver doesnt work!!! On 01/27/2016 10:31 PM, Venkatesan, Sekhar wrote: > 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 > other session never gets updated data in other session since > autocommit of insert statements never happens. > > Only workaround I am seeing is to explicitly issue "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 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 SQLDriverConnect(), autocommit was incorrectly reset > back to on when the connection was 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. The only answer I have is that you might get an answer sooner if you post this to the -odbc list: http://www.postgresql.org/list/pgsql-odbc/ > > Thanks, > > Sekhar > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! @ 2016-01-28 16:42 Adrian Klaver <adrian.klaver@aklaver.com> parent: Venkatesan, Sekhar <sekhar.venkatesan@emc.com> 0 siblings, 1 reply; 5+ messages in thread From: Adrian Klaver @ 2016-01-28 16:42 UTC (permalink / raw) To: Venkatesan, Sekhar <sekhar.venkatesan@emc.com>; pgsql-sql On 01/28/2016 08:33 AM, Venkatesan, Sekhar wrote: > Hi Adrian, > > Thanks for getting back to me. > I am new to this forum. Can you please explain how to post my message in odbc list? > How to contact this list there? Is there any email ID alias? You will need to be subscribed to the list to post to it, so go to the link I sent below and on left side there is a link under Mailing Lists that says Subscribe. Click on that and it will take you to a form that allows you to subscribe to a list. Just select pgsql-odbc in the Mailinglist dropdown. You will get a confirmation email that you will need to reply to, then you can post to that list. If it where me I would just cut and paste your original post into a new message to -odbc. > Please help. > > Thanks, > Sekhar > >> Please shed some light on this. Do ask me further question if you have any. > > The only answer I have is that you might get an answer sooner if you post this to the -odbc list: > > http://www.postgresql.org/list/pgsql-odbc/ > >> >> Thanks, >> >> Sekhar >> > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! @ 2016-01-28 16:53 Venkatesan, Sekhar <sekhar.venkatesan@emc.com> parent: Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 0 replies; 5+ messages in thread From: Venkatesan, Sekhar @ 2016-01-28 16:53 UTC (permalink / raw) To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-sql Thanks a ton Adrian. Appreciate your help! -----Original Message----- From: Adrian Klaver [mailto:adrian.klaver@aklaver.com] Sent: Thursday, January 28, 2016 10:13 PM To: Venkatesan, Sekhar; pgsql-sql@postgresql.org Subject: Re: [SQL] PostgreSQL: Autocommit through windows odbc driver doesnt work!!! On 01/28/2016 08:33 AM, Venkatesan, Sekhar wrote: > Hi Adrian, > > Thanks for getting back to me. > I am new to this forum. Can you please explain how to post my message in odbc list? > How to contact this list there? Is there any email ID alias? You will need to be subscribed to the list to post to it, so go to the link I sent below and on left side there is a link under Mailing Lists that says Subscribe. Click on that and it will take you to a form that allows you to subscribe to a list. Just select pgsql-odbc in the Mailinglist dropdown. You will get a confirmation email that you will need to reply to, then you can post to that list. If it where me I would just cut and paste your original post into a new message to -odbc. > Please help. > > Thanks, > Sekhar > >> Please shed some light on this. Do ask me further question if you have any. > > The only answer I have is that you might get an answer sooner if you post this to the -odbc list: > > http://www.postgresql.org/list/pgsql-odbc/ > >> >> Thanks, >> >> Sekhar >> > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-01-28 16:53 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-01-28 06:31 PostgreSQL: Autocommit through windows odbc driver doesnt work!!! Venkatesan, Sekhar <sekhar.venkatesan@emc.com> 2016-01-28 16:27 ` Adrian Klaver <adrian.klaver@aklaver.com> 2016-01-28 16:33 ` Venkatesan, Sekhar <sekhar.venkatesan@emc.com> 2016-01-28 16:42 ` Adrian Klaver <adrian.klaver@aklaver.com> 2016-01-28 16:53 ` Venkatesan, Sekhar <sekhar.venkatesan@emc.com>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox