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 1vJuUs-007rLn-0R for pgsql-docs@arkaria.postgresql.org; Fri, 14 Nov 2025 14:09:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJuUp-006btG-2v for pgsql-docs@arkaria.postgresql.org; Fri, 14 Nov 2025 14:09:51 +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 1vJuUp-006bt8-29 for pgsql-docs@lists.postgresql.org; Fri, 14 Nov 2025 14:09:51 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vJuUl-007jDD-2Y for pgsql-docs@lists.postgresql.org; Fri, 14 Nov 2025 14:09:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=paenTdwZBRKhbkg6abDVXl/5yBLitQtDcI1X132rfCg=; b=JZUBt f3wotAPpt2owg+gIA2NWGZfPKAGUPMXBjfAhPWQ77KhPC1115v72bMinxE2Wttkogg5MdYPXWbKNW CNdRCBfudFq5D9EnVeOhzoEWfg8A2lTfdqjGZHOOTf0JNIn/Ap90kZek1oziYXDn+vGo7s76w6aOJ 6ZWn4qnM/3RjT7TYyqFF0WZs8PZfHIbyO6jyJiMEoF9va3zaXf6uq4obFivBb5xjzU71AEW2ATnvC snAPB/shMkoxs5fVPnNjW1tTYo8Ju/PGS0dSfSASYs/agaJBd68ra1UMXXR7eyrkNAe9K1bkFR+hE HEHlshxxfY+aTJ0XZEvFVA5T6ZwaA==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1vJuUj-0000000FUBO-3F8z; Fri, 14 Nov 2025 09:09:45 -0500 Date: Fri, 14 Nov 2025 09:09:45 -0500 From: Bruce Momjian To: Peter Eisentraut Cc: PostgreSQL-documentation Subject: Re: Quoting of *_command arguments Message-ID: References: <97c4fe46-0c52-4fe8-90d3-10da182e587c@eisentraut.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Nov 12, 2025 at 08:48:39AM -0500, Bruce Momjian wrote: > On Wed, Nov 12, 2025 at 02:45:16PM +0100, Peter Eisentraut wrote: > > On 11.11.25 20:31, Bruce Momjian wrote: > > > We inconsistently double-quote the "%f" and "%p" arguments of > > > "archive_command" and "restore_command". Paths with spaces or special > > > characters, especially directory names in these cases, would need > > > double-quotes. > > > > > > This patch adds double-quotes to all instances. I can also go the other > > > way and remove them all, but we should be consistent. > > > > I think %f doesn't need to be quoted because it will only contain certain > > characters, but if we tried to clarify that it would probably be too > > confusing. It makes sense to nudge people that some quoting is prudent. > > Yeah, I did consider your point but you are right --- it is too complex > to quote one and not the other and expect people to understand why. > > > Your patch looks good to me. > > Thanks. Applied, and I added double-quotes for "%r". -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.