Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aL95B-00076v-T3 for pgsql-odbc@arkaria.postgresql.org; Mon, 18 Jan 2016 12:38:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aL95B-0001i7-7Z for pgsql-odbc@arkaria.postgresql.org; Mon, 18 Jan 2016 12:38:53 +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 1aL94o-0001J3-1U for pgsql-odbc@postgresql.org; Mon, 18 Jan 2016 12:38:30 +0000 Received: from mail2.asahi-net.or.jp ([202.224.39.198]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aL94g-0001UL-36 for pgsql-odbc@postgresql.org; Mon, 18 Jan 2016 12:38:28 +0000 Received: from [192.168.1.3] (h216142.dynamic.ppp.asahi-net.or.jp [61.114.216.142]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id C7B6E94A3; Mon, 18 Jan 2016 21:38:17 +0900 (JST) Subject: Re: New 9.5.0100 does not work properly To: Walter Willmertinger , Heikki Linnakangas References: <569438B3.10509@aklaver.com> Cc: Adrian Klaver , pgsql-odbc@postgresql.org From: "Inoue, Hiroshi" Message-ID: <569CDCC3.8000104@dream.email.ne.jp> Date: Mon, 18 Jan 2016 21:38:27 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------010909060905000807020409" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. --------------010909060905000807020409 Content-Type: multipart/alternative; boundary="------------020901060509070709030305" --------------020901060509070709030305 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Walter and Heikki, Probably I found the cause. On 2016/01/12 17:36, Walter Willmertinger wrote: > The "Write Conflict" is independent of the setting "row versioning". > When I strted it was switched off. I switched to "On", but the same > result. > > _Here is an excerpt from mylog:_ > > /[7.065]conn=000001F55B153090, query='SELECT > "KundenCode","DatumEreignis","AufnahmeDurchPersonalNr","WeiterAnPersonalNr","Status","Notiz","KdID","Prioritaet","ProgErledigt","update_cs","ZuletztBearbeitetPersonalNr" > FROM "public"."Notizen" WHERE "KundenCode" = E'1' AND "KdID" = 83' > / Doesn't the target table contain boolean items? Then the driver has to handle parse and describe message before executing the update query. > /[8.455]ParseAndDescribeWithLibpq: plan_name= query=UPDATE > "public"."Notizen" SET "Notiz"=$1 WHERE "KundenCode" = $2 AND "KdID" = > $3 AND "DatumEreignis" = $4 AND "AufnahmeDurchPersonalNr" = $5 AND > "WeiterAnPersonalNr" = $6 AND "Status" = $7 AND "Prioritaet" IS NULL > AND "ProgErledigt" = $8 AND "update_cs" = $9 AND > "ZuletztBearbeitetPersonalNr" IS NULL > [8.456]conn=000001F55B153090, query='BEGIN' > [8.457]ParseWithLibpq: plan_name= query=UPDATE "public"."Notizen" SET > "Notiz"=$1 WHERE "KundenCode" = $2 AND "KdID" = $3 AND "DatumEreignis" > = $4 AND "AufnahmeDurchPersonalNr" = $5 AND "WeiterAnPersonalNr" = $6 > AND "Status" = $7 AND "Prioritaet" IS NULL AND "ProgErledigt" = $8 AND > "update_cs" = $9 AND "ZuletztBearbeitetPersonalNr" IS NULL > / But a simple query is issued without using extended protocol because the *Server side prepare* option is turned off. > /[8.460]conn=000001F55B153090, query='UPDATE "public"."Notizen" SET > "Notiz"=E'Test xxx' WHERE "KundenCode" = E'1' AND "KdID" = 83 AND > "DatumEreignis" = E'2015-09-30 13:48:13'::timestamp AND > "AufnahmeDurchPersonalNr" = 80 AND "WeiterAnPersonalNr" = 80 AND > "Status" = E'E' AND "Prioritaet" IS NULL AND "ProgErledigt" = E'0' AND > "update_cs" = E'2015-09-30 13:48:15'::timestamp AND > "ZuletztBearbeitetPersonalNr" IS NULL' > / /Though this update returns the response 'UPDATE 1', SQLRowCount() doesn't work as expected due to SC_set_Result() in prepareParameters(). / > /[8.464]conn=000001F55B153090, query='ROLLBACK'/ */_One way to avoid the bug is to turn on the *Server side prepare* option. Though an appropriate bug fix is not clear to me, the attached patch is an example. regards, Hiroshi Inoue _/* --------------020901060509070709030305 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Hi Walter and Heikki,

Probably I found the cause.

On 2016/01/12 17:36, Walter Willmertinger wrote:
The "Write Conflict" is independent of the setting "row versioning". When I strted it was switched off. I switched to "On", but the same result.

Here is an excerpt from mylog:

[7.065]conn=000001F55B153090, query='SELECT "KundenCode","DatumEreignis","AufnahmeDurchPersonalNr","WeiterAnPersonalNr","Status","Notiz","KdID","Prioritaet","ProgErledigt","update_cs","ZuletztBearbeitetPersonalNr" FROM "public"."Notizen" WHERE "KundenCode" = E'1' AND "KdID" = 83'

Doesn't the target table contain boolean items?
Then the driver has to handle parse and describe message before executing the
update query.

[8.455]ParseAndDescribeWithLibpq: plan_name= query=UPDATE "public"."Notizen" SET "Notiz"=$1 WHERE "KundenCode" = $2 AND "KdID" = $3 AND "DatumEreignis" = $4 AND "AufnahmeDurchPersonalNr" = $5 AND "WeiterAnPersonalNr" = $6 AND "Status" = $7 AND "Prioritaet" IS NULL AND "ProgErledigt" = $8 AND "update_cs" = $9 AND "ZuletztBearbeitetPersonalNr" IS NULL
[8.456]conn=000001F55B153090, query='BEGIN'
[8.457]ParseWithLibpq: plan_name= query=UPDATE "public"."Notizen" SET "Notiz"=$1 WHERE "KundenCode" = $2 AND "KdID" = $3 AND "DatumEreignis" = $4 AND "AufnahmeDurchPersonalNr" = $5 AND "WeiterAnPersonalNr" = $6 AND "Status" = $7 AND "Prioritaet" IS NULL AND "ProgErledigt" = $8 AND "update_cs" = $9 AND "ZuletztBearbeitetPersonalNr" IS NULL

But a simple query is issued without using extended protocol because the
*Server side prepare* option is turned off.

[8.460]conn=000001F55B153090, query='UPDATE "public"."Notizen" SET "Notiz"=E'Test xxx' WHERE "KundenCode" = E'1' AND "KdID" = 83 AND "DatumEreignis" = E'2015-09-30 13:48:13'::timestamp AND "AufnahmeDurchPersonalNr" = 80 AND "WeiterAnPersonalNr" = 80 AND "Status" = E'E' AND "Prioritaet" IS NULL AND "ProgErledigt" = E'0' AND "update_cs" = E'2015-09-30 13:48:15'::timestamp AND "ZuletztBearbeitetPersonalNr" IS NULL'

Though this update returns the response 'UPDATE 1', SQLRowCount() doesn't
work as expected due to SC_set_Result() in prepareParameters().

[8.464]conn=000001F55B153090, query='ROLLBACK'


One way to avoid the bug is to turn on the *Server side prepare*
option.
Though an appropriate bug fix is not clear to me, the attached
patch is an example.

regards,
Hiroshi Inoue
--------------020901060509070709030305-- --------------010909060905000807020409 Content-Type: text/plain; charset=UTF-8; name="execute.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="execute.diff" ZGlmZiAtLWdpdCBhL2V4ZWN1dGUuYyBiL2V4ZWN1dGUuYwppbmRleCA1MGFi Yjg4Li5kMzEwZWQyIDEwMDY0NAotLS0gYS9leGVjdXRlLmMKKysrIGIvZXhl Y3V0ZS5jCkBAIC05NjYsNiArOTY2LDExIEBAIFBHQVBJX0V4ZWN1dGUoSFNU TVQgaHN0bXQsIFVXT1JEIGZsYWcpCiAJCX0KIG15bG9nKCJwcmVwYXJlUGFy YW1ldGVycyB3YXMgJXMgY2FsbGVkLCBwcmVwYXJlIHN0YXRlOiVkXG4iLCBz aG91bGRQYXJzZSA9PSBuQ2FsbFBhcnNlID8gIiIgOiAibm90Iiwgc3RtdC0+ cHJlcGFyZSk7CiAKKwkJaWYgKHNob3VsZFBhcnNlID09IG5DYWxsUGFyc2Ug JiYKKwkJICAgIFBSRVBBUkVfQllfVEhFX0RSSVZFUiA9PSBzdG10LT5wcmVw YXJlKQorCQl7CisJCQlTQ19zZXRfUmVzdWx0KHN0bXQsIE5VTEwpOworCQl9 CiAJCWlmIChpcGRvcHRzLT5wYXJhbV9wcm9jZXNzZWRfcHRyKQogCQkJKmlw ZG9wdHMtPnBhcmFtX3Byb2Nlc3NlZF9wdHIgPSAwOwogCQkvKgo= --------------010909060905000807020409 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc --------------010909060905000807020409--