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 1pPYBB-0003Rb-Px for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 00:19:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPYBA-0007Qp-Md for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 00:19:16 +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 1pPYBA-0007QY-CP for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 00:19:16 +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 1pPYB4-0008Is-HO for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 00:19:15 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id EE8695C0116; Tue, 7 Feb 2023 19:19:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 07 Feb 2023 19:19:09 -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=fm2; t=1675815549; x= 1675901949; bh=IOgHTUn9ev179HOZGlR1SuKRNshtlCX5HHf2UJSG7jo=; b=H ryiWd7TijnpkrpO3IdNltEtrKSd2sBz+YlDXcPNUsctssqPEq1AG+PVK0A8bJJb+ PeX6GsexhJ3Dl1bu+ZrdfiHflXfwLYf0wWmeigVjvYV0LcHt0sCugaPCPbygodZK XeY20T9BJOtz9FrH1RpJTFCXc3YSIInDc7Y+ZFp5//OdP9Vs2U2dUK3FgEBLaYoz EZ4AJ7m7Sn36B0hfnrWs/RpfI34yKVeOykYu2WJ1lPmXRSDs5oDyaU3Y0yuPh+G7 dftoDEJN4LPs5AUfwub1m+B9AlF6GvBauf1qi665Nl6s5WEl35PlsoEnhuOQOurg liSX0NbOA6mzIRmJzlO7A== 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=fm3; t=1675815549; x=1675901949; bh=I OgHTUn9ev179HOZGlR1SuKRNshtlCX5HHf2UJSG7jo=; b=L2QmEf9tiUn4xxKNl 3FV5lqUsajmIrAdZYyZHbyU24C1dYDvHu4zO1k8KAvpZiC7yh/0M8Pw1txj7LR4P ElgBpbuM06NErvlh2kTKhBRLn2PlV9C1mlh/01aEeOT6kQibuHWwJ23kC+TQ1+re YEaw0/dSu6oh+U9jvuLtYfs/5oes6OuRNpelr0w6Ok9v6dftxW32LdlXeHvp+Zl2 1ocK9UQ645q5TxZkebR+JEoRKRtUhMPVitQoGakvthsSHZbNVSH9Wo/w0AJ24N4P NUa+bMBu3Vw4lDuO7fXfjsCMDL7ZnoYWRcOAZyHNyQU0QT/gIvUHWA3qJHAQH07l Rks/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegledgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedugfeuleegveffhfegleejhefhtedtgeeileeggfeh fefffeevgeejtdeutefftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Feb 2023 19:19:09 -0500 (EST) Message-ID: <05d8145a-fd79-1062-ee27-5a87bfd59b0e@aklaver.com> Date: Tue, 7 Feb 2023 16:19:08 -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 Content-Language: en-US To: Brad White , "pgsql-generallists.postgresql.org" References: 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/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? If preexisting have there been any changes to the software stack since yesterday? If new how where the queries generated? > > Any suggestions on where to look? > > Thanks, > Brad. -- Adrian Klaver adrian.klaver@aklaver.com