Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQG3Q-0008Fl-TU for pgsql-general@arkaria.postgresql.org; Thu, 09 Feb 2023 23:10:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQG3P-0005L1-A0 for pgsql-general@arkaria.postgresql.org; Thu, 09 Feb 2023 23:10:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQG3O-0005Kp-6Y for pgsql-general@lists.postgresql.org; Thu, 09 Feb 2023 23:10:10 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQG3K-0007hS-VK for pgsql-general@lists.postgresql.org; Thu, 09 Feb 2023 23:10:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 421CA5C010A; Thu, 9 Feb 2023 18:10:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 09 Feb 2023 18:10:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1675984206; x= 1676070606; bh=uYOP4lWqjCOsqwKHiqlsHoZCYoltETgoNEk0E9tmNY8=; b=d 00m3b8uVOqX4vOw2KWANXa+9XwYot5W0uJ+YU+w+TM76K30k+4iyUeCfmIL8QIHa Bq0Ol/GG4JZoORrTJRt9xaHUzi3Q0qrLUBTDUy6OxreCOYusH1MSkx0N8PiE3eQF E8An1Hkx3avn84YaoCSoIJ4rY5SdRMHyZerTodWUHW5p6z2JuPUfJm/VY4uNf6Sy BbHxdlTrMN44haayt0H6deYkwQZbS6RujQAm1QeqaoK06qfUI4b2Xkltfheo3sZI 48Q0Vq80mTFCBALw/S5dta9f3WPOlyuwFiRWd1KRMld0jVyeXMtuxh7vxiGwtupM MGUOqf/YkonILJLz7N07g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1675984206; x=1676070606; bh=u YOP4lWqjCOsqwKHiqlsHoZCYoltETgoNEk0E9tmNY8=; b=FqtwEJFbG1XwU/JGn P7xGmckbk0OJybU4LBgxz7SrsRJIuPqwr1RSi+6s7kJO4YQoHQwxqjgbHjwm3l9U Bo96kt0X4EDAig3oqVAG9xEI1ec7jwlRwLFCydhVJo+V3Zwn4wOL+so2Ubox+B5R bX0MM3F0l1mqm26ubY95IAec/5tl9HcMhAP/8URJ0FtJYentUlpq5rJlvSOpg3MY K4seyFdaLnTT3kFOIhjtlgBvLr2FxCBFBckCI65MXahEr9sxMKSBZUmArg8sO4ON BTaj9Qo/aeJ27AuZBkuvNhxLqHhQE42Ir2PHRhfip0/8EyR+2xGtRW+nwhW8plOg snEdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehgedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeelkeegjefhkeetheefudevteehiedvudehkeduleet fedvffeuhedtvdegtdeffeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Feb 2023 18:10:05 -0500 (EST) Message-ID: Date: Thu, 9 Feb 2023 15:10:04 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Quoting issue from ODBC To: Brad White , "pgsql-generallists.postgresql.org" References: <05d8145a-fd79-1062-ee27-5a87bfd59b0e@aklaver.com> <89465c0e-c683-1563-7e16-12688f77bdc3@gmail.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/9/23 14:43, Brad White wrote: > On Tue, Feb 7, 2023 at 10:20 PM Brad White > wrote: > > On 2/7/2023 6:19 PM, Adrian Klaver wrote: >> On 2/7/23 16:10, Brad White wrote: >>> Front end: Access 365 >>> Back end: Postgres 9.4 >>> (I know, we are in the process of upgrading) >>> >>> I'm getting some cases where the SQL sent from MS-Access is failing. >>> Looking at the postgres log shows that the field names and table >>> names are not being quoted properly. >>> It has been my experience that Access usually does a better job >>> at converting the queries than I would have expected, but not in >>> this instance. >>> >>> For example >>> >>> Access: connection.Execute "UPDATE [" & strTable & "] SET [" & >>> strTable & "].[InsertFlag] = Null" _ >>>      & " WHERE ((([" & strTable & "].[InsertFlag])=" & lngCurrUID >>> & "));", , adCmdText Or adExecuteNoRecords >>> Note that InsertFlag is bracketed the same way in both instances. >>> >>> PSQL: UPDATE "public"."Orders" SET InsertFlag=NULL  WHERE >>> ("InsertFlag" = 166 ) >>> Note that InsertFlag is quoted once but not the other time. >>> Of course this gives the error: column "insertflag" of relation >>> "Orders" does not exist at character 35. >>> >>> Looks like I have about 16 unique instances of statements not >>> being quoted correctly resulting in over 500 errors in the log >>> for today. >> >> Where these preexisting queries or where they created today? > > These queries are decades old but I don't view this log file very > often, so I don't know how long. > > I'll review when I get back on site Thursday and see if I can find > any users that are not getting the error or when it started. > >> >>> >>> Any suggestions on where to look? >>> >>> Thanks, >>> Brad. > > Back in the office today and I note that all of the fields that are > getting the issue are the target field in an UPDATE statement. > All the other tables and field names are quoted correctly. > > I suspect an ODBC driver bug.  Is there a better place to report those? > > Driver: PostgreSQL Unicode > Filename: PSQLODBC35W.DLL > Version: 13.02.00 > ReleaseDate: 9/22/2021 https://www.postgresql.org/list/pgsql-odbc/ > > On the other hand, the app updates things all the time. Only about 12 of > the update statements are ending up in the log. Still looking for the > common denominator in how those statements are called. So how the successful UPDATE's called? Are the successful UPDATES's on the same tables and columns? From your subsequent post: "Going back to early 2020, I don't have any logs that don't have these errors, so it is not a recent change." Are these UPDATE's actually necessary? In other words has nobody noticed a problem with the data over that time frame? -- Adrian Klaver adrian.klaver@aklaver.com