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 1wNeMy-000xsz-1e for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2026 22:17:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNeMv-00FNpn-2F for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2026 22:17:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wNeMu-00FNpf-1y for pgsql-hackers@lists.postgresql.org; Thu, 14 May 2026 22:17:25 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wNeMr-00000000eNt-13ak for pgsql-hackers@postgresql.org; Thu, 14 May 2026 22:17:23 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id B3C56EC0086; Thu, 14 May 2026 18:17:18 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 14 May 2026 18:17:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc: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=1778797038; x=1778883438; bh=IwZ/7jip+b OJAcAS+9EHj0bOVbkvMLjCOGyk0cMc2AQ=; b=iuzrU86uH7WxHZAQ4b9PeOkDxS YEH6kqJpgsqmtoAOM15QpyqOrdqJJB6kGODNvbWv76i3Tw41BykS2s1AYUB6cnAc lErIQffJpIQoullaubJTKGlD3v0Ylof8rBoqpK6hAOkBEhUVNHtasHsRG6rTueUB BpS48bmvgeceSNlyN0XeZORRgqQrxO1fwL6ordCwzqn3wkZ05GHDZhDhN4GWXctW ZgJvgUCCJaFF0xUl7q+YdHQnMdazTxQl4LECcGRjB2kowYV2ZJuRm11yvUGMBfiA ue36xc+HX+IVQDdXTKo5lsUPyz2K7qT2DzPmPmXUr3+lt4BxyV5O9bkte0ww== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=fm3; t= 1778797038; x=1778883438; bh=IwZ/7jip+bOJAcAS+9EHj0bOVbkvMLjCOGy k0cMc2AQ=; b=gHMJMPX2EfcW5WlNLwaOSRXp0GrQZh6Tq1r6WKltt/zz1nof1+l 62q/jNxcV9gs48j3KcoJrsxBqO+2/tm8aY0GBYNNOehB3/QANAaD7QddDc+kAzqi 2wF3+DdgUzrRcXVub0QoT/iUGFTyOkm2oih1dYfi9L4WJaWCJIsD80WMBX8+BPN7 DecWKGKkcCIXrnVP9Hx8N68EFcYXcBjzj41Rik/MJBh0D4ZvHlIQqCDpF6YVuaaZ 4VTn6ahvZkCwTXHG08kFGvVLT0kZl6y0GFG366m+5Bbcwwl4GqtrOpP/TGNy04fz FvjShbr298sME03hxS7Cyk9pCrKlUDxk0sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduvdekieelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttdfstd dttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgr rhgriigvlhdruggvqeenucggtffrrghtthgvrhhnpeeffffgledvffegtdevlefgtdeggf fhvdekgfegteeiveejkeetudelveejhfeugeenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvgdpnh gspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhgshhq lhesjhdquggrvhhishdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhsse hpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 May 2026 18:17:18 -0400 (EDT) Date: Thu, 14 May 2026 18:17:17 -0400 From: Andres Freund To: Jeff Davis Cc: pgsql-hackers@postgresql.org Subject: Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings. Message-ID: References: <2d758e07dff26bcc7cbe2aec57431329bfe3679a.camel@j-davis.com> <56d386147d2f0a269c7b8644eee05d1dce4aa80d.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56d386147d2f0a269c7b8644eee05d1dce4aa80d.camel@j-davis.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-05-05 13:23:12 -0700, Jeff Davis wrote: > Agreed. I did this to match up with the ICU API a bit better, but if > it's interfering with useful tools, then the special cases aren't worth > it. > Patch attached. Thanks! > It causes a bit of churn, so one disadvantage is that it will complicate > future backports in this area. I think it's worth the gain in instrument-ability. I also suspect it's good for runtime performance, adding all those branches can't be particularly good. Greetings, Andres Freund