Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vyzD1-000b0h-0p for pgsql-general@arkaria.postgresql.org; Sat, 07 Mar 2026 21:29:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vyzCy-009ekj-2x for pgsql-general@arkaria.postgresql.org; Sat, 07 Mar 2026 21:29:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vyzCx-009ekb-30 for pgsql-general@lists.postgresql.org; Sat, 07 Mar 2026 21:29:13 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vyzCw-0000000134Y-0Yll for pgsql-general@lists.postgresql.org; Sat, 07 Mar 2026 21:29:11 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id C974AEC04DB; Sat, 7 Mar 2026 16:29:08 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Sat, 07 Mar 2026 16:29:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1772918948; x=1773005348; bh=V9m/ZieaPpS4D2mMkid8ZEXKCNyzQJLdMIy2tjiHWbM=; b= eYklZVLs9vtWdnZLRZJJBHcuhE9y0Zi09+pbbfFhJIoGusBFQaSvro2Rx+D8rqU5 20qJ6WNuwjbImnxKNug/AiccI/vGNm8GV+StFEQjCoIMEI3/VpailHQyLelQ8fD+ k83pI/m5ZyOq9ITm9X9cecVWLL8jnL3AsiAMPTkRLWbvpHh1KOg2WygjXwgWip5R c7EMRnTsNOpNl3+5n9nHpgQaxc41O/E/TXkY++rha10O78xn5+BoJ+2wYetbzdE/ rYsdiM60DvDvBAfDQcILOXs8Xv+vpqcAtg9fuiT5vyuWVFBq/B3SbtIGz+WP6xpI lBDBPgxwny3GLAJe3yhq6w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1772918948; x= 1773005348; bh=V9m/ZieaPpS4D2mMkid8ZEXKCNyzQJLdMIy2tjiHWbM=; b=z b4LT7zQvdW1fWup2ImjZYLr/mao8qpkCHZUrawgHSGG5kyVk1u5Bvm01OcOiQdVj LJkhZGuh2s8RJQOK5d98giPhxf7OG4ieiHRDulnYyXukviZOuiDyJwPIKTWNA82+ /GBIck3QK7DPZAAGLPLPUT35nTLdPsYQiyhfnOy1YKvfcOl6kdUr5qBZ1ZWwhBI1 iBwjl5+S3WfbmMS5bQgGoj3qKENhk67fPigXMkZOttMyuTM7T2PjThLqyYpKVsRs iQrwdUphKom6RlUbTh/POeRKpqXNpxDC2s4tP4dT1smDmJLYrP0A9zvLvjNlZdrJ vTujt47wxT6l9bD+rwX6A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvjeeffeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepveffkeekfeduvdehfeegkefhfeegjeduiedvfeejiefh teduvdfggeeiuedtfedunecuffhomhgrihhnpehmihgtrhhoshhofhhtrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghn rdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepgedpmhhoug gvpehsmhhtphhouhhtpdhrtghpthhtohepihhkohhrohhttddusehgmhgrihhlrdgtohhm pdhrtghpthhtohepuggrvhhiugdrghdrjhhohhhnshhtohhnsehgmhgrihhlrdgtohhmpd hrtghpthhtoheprhhosghjshgrrhhgvghnthesghhmrghilhdrtghomhdprhgtphhtthho pehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Mar 2026 16:29:07 -0500 (EST) Message-ID: <8f73ec0b-8f68-4f87-badc-a86939a211e1@aklaver.com> Date: Sat, 7 Mar 2026 13:29:07 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to properly use TRIM()? To: Igor Korot , "David G. Johnston" Cc: Rob Sargent , "pgsql-generallists.postgresql.org" References: 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 3/7/26 12:46 PM, Igor Korot wrote: > Hi, David, > > On Sat, Mar 7, 2026 at 12:03 PM David G. Johnston > > wrote: > > On Sat, Mar 7, 2026 at 12:58 PM Igor Korot > wrote: > > So I started looking for a way to return SQL_NO_DATA > on that 4th column... > > > Doesn't "No Data" refer to the result set as a whole, not individual > columns?  I'd assume NULL is detected some other way. > > > No, I think it’s column based. 1) My knowledge of ODBC is limited. 2) This: https://learn.microsoft.com/en-us/sql/odbc/reference/develop-app/return-codes-odbc?view=sql-server-ver17 "SQL_NO_DATA No more data was available. The application calls SQLGetDiagRec or SQLGetDiagField to retrieve additional information. One or more driver-defined status records in class 02xxx may be returned. Note: In ODBC 2.x, this return code was named SQL_NO_DATA_FOUND." would seem to indicate that David Johnston is correct: 'Doesn't "No Data" refer to the result set as a whole, not individual columns? I'd assume NULL is detected some other way.' > The call to SQLGetData() returns data in one column. > > And as stated it successfully retrieves empty array for column 3 and > moves on. > > Thank you. > > > David J. > -- Adrian Klaver adrian.klaver@aklaver.com