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 1pPby7-0005yQ-Ne for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 04:22:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPbx8-0000Mc-LV for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 04:21:02 +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 1pPbx8-0000MT-4k for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 04:21:02 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pPbx5-0001K0-MR for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 04:21:01 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-15fe106c7c7so21737421fac.8 for ; Tue, 07 Feb 2023 20:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=4eNhFpnqK9sD4hutUi170Eu5PQErF3qM9ZnbEDAdgbQ=; b=UXa5W0u+PfYOsbt3QxqOQTC7gvRR8+JVaMfLxcfcJdl4WgpBBQrQb1jsDnZWVoXrhL f+Bd93bDnKK3eI4JGhA4u+tudHcuXTPrOF4ZLdSCQFMvjsaHU9yAaG7V44l7gz82nwDz QA0oVfm42Z/ippF3nFUoCtsTNborKQJ3oxS26EYqGhZx5F1Fr0ppxpMjgIhuJl9JH3Qt bP7zhUyTgC2s1/j+84hRMZZg+1+FnaiD3eVQ2I33goAVHt1uUoFoHMiJZGGLZbjXVtSA 9mahFuK5WZ5t1K6VmVph0q8xxIzQ74/Il15fj6MzZEN4Kq2UhC9XKJiK+u6LVpDxkKZi ooUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=4eNhFpnqK9sD4hutUi170Eu5PQErF3qM9ZnbEDAdgbQ=; b=AXyDk00qD9ehjgTPwevGHoPMWOyoMWdvqI4nCOv1JQdJfBVYRNcfbUrn+McprVbzeL sXkudxvz4uigMI3ZsykM2SSpblELe/EuvWiRPKHDy9v2FjkqGeEfdBDt0fEtKrSTg2JZ JRvn1znv89G7Dhim6SXvdmZPai3yyWHzy/Xj/GthmVc/r8jVQYJdmnHJqCzwJkz0Ff1P vUG9p6+c5y2IalgQ3gzWs/UcDo2Hng5BuahSpnij+w+IF2PPgnZgPf7MfAQ0oWt3ei9o Mrd0nYts1A8doQOetpItzLG2151LG4qJPaOw5rD6jTr33cL+rk5YAxeNVYPNfIQcOYxW jFEQ== X-Gm-Message-State: AO0yUKVn86rEATGWeIs0YOqhCmThREc0laAYupaW3BbWsODxFWtWyRC8 UAa0dbAW/Edulnow7Gl5gP/Dbx8Dx9I= X-Google-Smtp-Source: AK7set8RXzYqO9vZetzsg7Y+aAd9Fh/+yHkN7fq9eyjK4DYY2HRhwA/sOFhmR2Wobw/KnYJCIzPEFg== X-Received: by 2002:a05:6870:d14c:b0:163:2d66:de07 with SMTP id f12-20020a056870d14c00b001632d66de07mr3201492oac.29.1675830058962; Tue, 07 Feb 2023 20:20:58 -0800 (PST) Received: from [192.168.1.115] (h244.184.30.69.dynamic.ip.windstream.net. [69.30.184.244]) by smtp.gmail.com with ESMTPSA id ds7-20020a0568705b0700b0016a19e602bbsm5130066oab.15.2023.02.07.20.20.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Feb 2023 20:20:58 -0800 (PST) Content-Type: multipart/alternative; boundary="------------3fTM68ovb0XfURdUAsT5Zg01" Message-ID: <89465c0e-c683-1563-7e16-12688f77bdc3@gmail.com> Date: Tue, 7 Feb 2023 22:20:58 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: Quoting issue from ODBC Content-Language: en-US To: Adrian Klaver , "pgsql-generallists.postgresql.org" References: <05d8145a-fd79-1062-ee27-5a87bfd59b0e@aklaver.com> From: Brad White In-Reply-To: <05d8145a-fd79-1062-ee27-5a87bfd59b0e@aklaver.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------3fTM68ovb0XfURdUAsT5Zg01 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. > -- Quote Signature I talk with clients, find out where their pain points are, and solve those. On-call IT Management for small companies and non-profits. SCP, Inc. bwhite@inebraska.com 402-601-7990 Quote of the Day    There is a huge difference between fathering a child and being a father.    One produces a child. The other produces an adult.     -- John Eldredge --------------3fTM68ovb0XfURdUAsT5Zg01 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
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.

--
Quote Signature I talk with clients, find out where their pain points are, and solve those.
On-call IT Management for small companies and non-profits.
SCP, Inc.
bwhite@inebraska.com
402-601-7990


Quote of the Day
   There is a huge difference between fathering a child and being a father.
   One produces a child. The other produces an adult.
    -- John Eldredge
--------------3fTM68ovb0XfURdUAsT5Zg01--