Re: Quoting of *_command arguments

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: PostgreSQL-documentation <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Quoting of *_command arguments
Date: 2025-11-14 14:09:45
Message-ID: aRc4Kakf_t3OrZTO@momjian.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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 <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Do not let urgent matters crowd out time for investment in the future.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Fujii Masao 2025-11-16 06:19:45 Document default values for --fsync-interval and --plugin in pg_recvlogical
Previous Message Álvaro Herrera 2025-11-14 11:05:23 Re: copy.sgml: add XML ID attributes to <varlistentry> tags.