Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aOpQx-0003tZ-0O for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 16:28:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aOpQw-0007Zk-JO for pgsql-sql@arkaria.postgresql.org; Thu, 28 Jan 2016 16:28:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOpQv-0007WT-5h for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 16:28:33 +0000 Received: from [66.111.4.27] (helo=out3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOpQm-0002zH-LC for pgsql-sql@postgresql.org; Thu, 28 Jan 2016 16:28:32 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 106EF20743 for ; Thu, 28 Jan 2016 11:28:02 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Thu, 28 Jan 2016 11:28:02 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=6WwBqFu8HpMUrk+b93qi87gtnrc=; b=ok7dBY wjesaQtr1I4pyYOUMUGwyPzhBD/Ev3EG+jj0z09NeDEUYGahS/8h11ol7C4W0Xrn R3EDIgGJj5V+MDyug3m9EJXac1H8IUmnQNCPWKYrT6B6V5fFi/aYzclXlWlDov3u fYC28k6Bpqf/JJStihM51dBxdxcHy2qC4SSKg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=6WwBqFu8HpMUrk+ b93qi87gtnrc=; b=B9dVChtpL7jjXwCtbS/BuhltJKXomdHt3RduLDBIvataQ+j 9n00BSuDYQHDZgZX45w/DcH59ASeRtzBOPzk9exekxQ/vVjDB3ivfWsVuyfZXrp3 N/k/Zcd1YqUvuvJUbUp0AAsPXvxkKocuKyyh+e1MrduzPmeXJg1EhWG2JRgc= X-Sasl-enc: goVetijHT5fs93znn9yMbL74NS3EjATAtEYqNDJ9jtCe 1453998481 Received: from [192.168.1.2] (65-102-182-223.tukw.qwest.net [65.102.182.223]) by mail.messagingengine.com (Postfix) with ESMTPA id 63346C00020; Thu, 28 Jan 2016 11:28:01 -0500 (EST) Subject: Re: PostgreSQL: Autocommit through windows odbc driver doesnt work!!! To: "Venkatesan, Sekhar" , "pgsql-sql@postgresql.org" References: From: Adrian Klaver Message-ID: <56AA4157.4040509@aklaver.com> Date: Thu, 28 Jan 2016 08:27:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.27 (deferred) X-Pg-Spam-Score: -1.9 (-) 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 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