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.94.2) (envelope-from ) id 1tgSrJ-00Aupt-7s for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Feb 2025 18:13:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tgSrI-0046zp-Cn for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Feb 2025 18:13:44 +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.94.2) (envelope-from ) id 1tgSrI-0046wd-30 for pgsql-hackers@lists.postgresql.org; Fri, 07 Feb 2025 18:13:44 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tgSrF-004PQa-07; Fri, 07 Feb 2025 18:13:43 +0000 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-854a68f5a9cso187477239f.0; Fri, 07 Feb 2025 10:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738952019; x=1739556819; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=s8KOSQOEPxsn+UB2nxmfZISI0TZLB2OdIjANuE8FQoc=; b=IRS+9GLIJqd4FH+/A2dsO9i4QysDbOlIHV8c6WgRxgL9AEGZ2MPC7V2p8d1D3GQxOY KmeVixx/7c/Xeo5ebFBqweKFPqaQXR/aJwPoslCjJBsoBAuV72StqVJt67DhUaZAz26S u9F0Ov3BdVG8u5e6OeLpmK/JyuEOZQqqYjYfTQWVLJYgxCX8pah3tkA2MYYX1Y7DGLqA sBSq0XoZDZN3VtfcdVEkHyTqSYfONVyN0orjD+Lf48q/TKlfPKB6N38IzrXISYdZ/BBP Ku9tYU6737WXvSCPzmRK0m9bDCsmf8pbf0vpVeu+381zZW68CemL4frezAwImvwfN1zi +LOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738952019; x=1739556819; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=s8KOSQOEPxsn+UB2nxmfZISI0TZLB2OdIjANuE8FQoc=; b=cfYxgM7o68X16Scz4yee4uNkoGN0UPoj3quVFeDqO7eWm7o8lHoRww1wOvMXmshfup f6sNJHqWw6O0AIr/L+APU/Rt6U+gs5laBCwX8GLaiYmvBbvEvyLpdeX0u4cfwvV4OPpJ /K5PfU/cV1AZNvCZkobFcq0baRIl6AmYfhyFFF1rtlc8JC2cTqgirDEG9mmMN2TzEf1v FeyP52Ky+LjAOolp+kaPCLCYcWXlBos8t0jRk0qPyNBszs4DZz7ElZ9f/KnRYvDgIig/ SXW8wPJx3sE+6LmbYD+H5m3gNv8hWvXld+D13kEl60dwZhR2Ub8dGHQrUpMeTWrJxKVq bVzw== X-Forwarded-Encrypted: i=1; AJvYcCWhosAq+tuQ9TX+1daTbyV+ItdDoowJB3iTPf5pxGld8QyA+RG2V0SfX4F7v0a8dNmWPbDUDAWGGI68kU9ZWw==@postgresql.org, AJvYcCXpa/RNCofdYtPU5nehUZWD0Dj/K2Fp7QNCn7cJQq+zNHf2e/ORJ94d2eN7avKgU/5+ZzF2xA==@postgresql.org X-Gm-Message-State: AOJu0Yzsz0TOJcpyiJmDfmmC6qg/hyQv+fSUYu+C9vhoJfQKuhnYBmL/ guYIjiCUM4pPVL/xFbO3Vq2RycVOpB4Cc2KSLTIxR2sImIWG2RZb X-Gm-Gg: ASbGncsN0OHeWKvdUZeESD44OP/yWndw/u8CLWZ72emWaOnKiHl1ubKsHHYG5VqH5lX 74gt4O3ys+AnwcQCnRURM/A/g1MEpLhnUHtYQM68V1Kr8TZKxdl0bZqMeo66OXjT4SJyUkt14DL DJGnMrdDsQGdzIplFl34yLgFvg4R0NUEzqWIgtIrpJcLrs0o0o1HWVtJYOBM44hDuC8Ku6FkBD7 UGK05TisBUaHst0bHmEszyO5RNXkJSn1hIhD2z/qcAv75n+L6ppKXcrojrRzp4d8EYSRqFhy26e wljMnG6BcIa2692kV+KjwPdPipkMQU/1eUcE5ePNoAVmX39bmGs8JUH/oE+aRiCcgQzkkbI9NKu vsRm+DA== X-Google-Smtp-Source: AGHT+IEb2EBSWK10FZPnL9Uw9afwDByV0nRlfJP1dEjikAPftw2Rv7SDYwfsRctvUTgN7kpQA3rIRA== X-Received: by 2002:a05:6602:368e:b0:84a:7906:21e3 with SMTP id ca18e2360f4ac-854fd8b2547mr510054039f.7.1738952019589; Fri, 07 Feb 2025 10:13:39 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4eccf9afc20sm848395173.25.2025.02.07.10.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2025 10:13:39 -0800 (PST) Date: Fri, 7 Feb 2025 12:13:37 -0600 From: Nathan Bossart To: Tom Lane Cc: Andres Freund , Fujii Masao , Tatsuo Ishii , pgsql-release@lists.postgresql.org, pgsql-hackers@postgresql.org Subject: Re: Fix for Extra Parenthesis in pgbench progress message Message-ID: References: <85fe426d-248a-47f7-8784-22af811ee572@oss.nttdata.com> <20241108.114713.484828673471024549.ishii@postgresql.org> <95f1100e-e59b-41b7-a406-f865c2e69db7@oss.nttdata.com> <20241125.083155.1820744655877715597.ishii@postgresql.org> <4k4drkh7bcmdezq6zbkhp25mnrzpswqi2o75d5uv2eeg3aq6q7@b7kqdmzzwzgb> <1456496.1738951118@sss.pgh.pa.us> <1457693.1738951804@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457693.1738951804@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 07, 2025 at 01:10:04PM -0500, Tom Lane wrote: > Nathan Bossart writes: >> Oops, I was already taking a look at this. I figured it'd just be >> something like the following, although maybe there's a more elegant way. > > Well, the stuff with prev_chars really ought to be skipped as well. > (Yeah, it's probably a no-op, but readers shouldn't have to figure > that out.) > > My thought was that duplicating the logic isn't so bad, as attached. WFM! -- nathan