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 1pPXyI-0002vO-CF for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 00:05:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPXyH-000100-4m for pgsql-general@arkaria.postgresql.org; Wed, 08 Feb 2023 00:05:57 +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 1pPXyF-0000xU-B1 for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 00:05:56 +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 1pPXy8-0008CK-9u for pgsql-general@lists.postgresql.org; Wed, 08 Feb 2023 00:05:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1C6295C012C; Tue, 7 Feb 2023 19:05:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 07 Feb 2023 19:05:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc: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=1675814746; x= 1675901146; bh=yeFtmI9yUu/XtBp2B9X/5mGW8HjdRmfpMy7FkcxR4vg=; b=W N7+27d3EiHXAAzvK0qgeVTkHRmAlS0NHblRi37Jgi2q9M1G4ZWHOaJHPl3Yipl4c 4hyxWZL8Tws9KXBUJeXlRDd76vt4gRkokeTCS4YgkSJ8k5tZwmC8ISirsXwGAscD YdPd0cT5z4JudOxt5Wc6ILimEVPQuna2dcxrXVwdkT0yxpmhmmP3Y0VhVhV3/onl d28VBbxXYDe8Wbltn0tW1kh+JOcjhneL2/oHCgsNF69wavQu7jMatw9w6AzwL/Fg YeWkTjQrM/LIx+UOMdKhLU+VK2Nxpdpbzn0XSHwo+h83ebDfuZsYpOLEBHyYAbLW lgbqp+7SrgMhIdGBA99oQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1675814746; x= 1675901146; bh=yeFtmI9yUu/XtBp2B9X/5mGW8HjdRmfpMy7FkcxR4vg=; b=H tV+2GTC6Wbh0QbGfFdcwnytweeDw4Z5VLURyugnR0L7KO75vgE3levew6EQ67n/X DWOXjxSw/FYXUDW0dy5g92ZUp39wzky9uiYS3dp/fpDP8ZFMXDQcs2MkWRKY7Tr1 FlxmxNZ/6jtHyg1IYaEutv3OfNrpb/0sUJ8FQSPXEnrJditkVNAJjs7T9N1FUHzL TX8WS9PnOH8jcnTFjtmrFXTYLCFaULluWgp3f/PdnWFWpl18ekiQCxETLM67LlS9 5l7r8Ll7ZNjeC/z2vwGY7q8X8IXkwHGbD45kl25Kf2gj3GVm6Gk3H7pYGt+Y4jFj b/LH4ijAxbA63thMdQBiQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegledgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhephedugfethfettdehieevteeukedtjedvhfevkefg udefgeevteduvdeuvdeggeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Feb 2023 19:05:45 -0500 (EST) Message-ID: Date: Tue, 7 Feb 2023 16:05:44 -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: A Small psql Suggestion Content-Language: en-US To: Brad White Cc: "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:00, 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 "Order > Items" does not exist at character 35 > > Any suggestions on where to look? 1) Do not tack on to an existing thread, create a new post. 2) Where is the query coming from, manually created code or something ORM like? 3) > > Thanks, > Brad. -- Adrian Klaver adrian.klaver@aklaver.com