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

From Tsunakawa, Takayuki
Subject Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
Date
Msg-id 0A3221C70F24FB45833433255569204D1F521518@G01JPEXMBYT05
Whole thread Raw
In response to Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!  ("Venkatesan, Sekhar" <sekhar.venkatesan@emc.com>)
Responses Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!
List pgsql-odbc
Hello, Sekhar,

> Sorry for getting back to you late. I tried with psqlodbc version, 09.05.0100
> but the issue is still seen?
> Let me know what next step I can follow to root cause this? Any tracing
> you would suggest?

Have you been able to solve this problem?

I tried the attached test program with psqlodbc-09.05.0100 on both Linux and Windows.  It worked as expected in both
casesof SQL_AUTOCOMMIT_ON and SQL_AUTOCOMMIT_OFF.  That is, I could see the inserted row from another (psql) session
afterthe test program had finished. 

Could you share the source code of your sample program that doesn't work?

BTW, just out of curiosity, what product are you trying to certify with PostgreSQL?  I'm interested in expanding the
PostgreSQLecosystem. 

Regards
Takayuki Tsunakawa


> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Venkatesan, Sekhar
> Sent: Tuesday, February 09, 2016 1:10 PM
> To: Adrian Klaver; Joshua D. Drake; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] PostgreSQL: Autocommit through windows odbc driver
> doesnt work!!!
>
> Hi Adrian,
>
> Sorry for getting back to you late. I tried with psqlodbc version, 09.05.0100
> but the issue is still seen?
> Let me know what next step I can follow to root cause this? Any tracing
> you would suggest?
>
> Thanks,
> Sekhar
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
> Sent: Saturday, January 30, 2016 3:00 AM
> To: Venkatesan, Sekhar; Joshua D. Drake; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] PostgreSQL: Autocommit through windows odbc driver
> doesnt work!!!
>
> On 01/28/2016 08:36 PM, Venkatesan, Sekhar wrote:
> > HI Joshua,
> >
> > I perform the following set of operations to set autocommit in postgreSQL
> through ODBC in windows.
> > SQLSetConnectAttr(hDbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)
> > SQL_AUTOCOMMIT_ON,  0)
> >
> > ret = SQLDriverConnect(_hdbc, NULL, (SQLCHAR*) dsn.GetChars(),
> > SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT);
> >
> > This doesn't enable autocommit. If I call SQLSetConnectAttr after
> SQLDriverConnect, autocommit is set.
> > Any issue with this sequence? I assume It should be possible to set
> SQL_ATTR_AUTOCOMMIT before establishing connection.
> > Can you please confirm on this behavior?
>
> I would say it is this bug:
>
> http://www.postgresql.org/message-id/55BD0ABE.5010800@iki.fi
>
> So have you tried the latest psqlodbc version, 09.05.0100 ?
>
> >
> > Thanks,
> > Sekhar
> >
> > -----Original Message-----
> > From: Joshua D. Drake [mailto:jd@commandprompt.com]
> > Sent: Thursday, January 28, 2016 11:14 PM
> > To: Venkatesan, Sekhar; pgsql-odbc@postgresql.org
> > Subject: Re: [ODBC] PostgreSQL: Autocommit through windows odbc driver
> doesnt work!!!
> >
> > On 01/28/2016 08:53 AM, Venkatesan, Sekhar wrote:
> >
> >> 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.
> >>
> >
> > By default PostgreSQL "autocommits". If it isn't in your case, your driver
> is starting a transaction and not committing it.
> >
> > Sincerely,
> >
> > JD
> >
> >
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>
> --
> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make
> changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc

Attachment

pgsql-odbc by date:

Previous
From: Dang Minh Huong
Date:
Subject: Re: Degradation of performance when upgrade psqlodbc to 09.03.0400
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!!