From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tels <nospam-pg-abuse@bloodgate.com>
Cc: "Dagfinn Ilmari Mannsåker" <ilmari@ilmari.org>
Cc: Victor Wagner <vitus@wagner.pp.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Non-portable shell code in pg_upgrade tap tests
Date: Sat, 21 Jul 2018 19:20:08 -0400
Message-ID: <25533.1532215208@sss.pgh.pa.us> (raw)
In-Reply-To: <4aca1a4e7e8e82513988a7236e227c2d.squirrel@sm.webmail.pair.com>
References: <20180720153820.69e9ae6c@fafnir.local.vm>
<17833.1532096747@sss.pgh.pa.us>
<20180720175508.07776219@fafnir.local.vm>
<c96303c04c360bbedaa04f90f515745b.squirrel@sm.webmail.pair.com>
<4263.1532186967@sss.pgh.pa.us>
<d8j60181qpn.fsf@dalvik.ping.uio.no>
<4aca1a4e7e8e82513988a7236e227c2d.squirrel@sm.webmail.pair.com>
"Tels" <nospam-pg-abuse@bloodgate.com> writes:
> Looking at your new patch, I notice you used "" for quoting, not ''. (Not
> sure which variant Tom used when pushing a patch).
> I'm not a shell expert, but I think '' are safer, as "" still has some
> interpolation from the shell (at least on the systems I use regulary):
We can't do that here because '' would suppress interpolation of the
variable's value, which is sort of the point.
AFAIK, the locution "$foo" is safe regardless of what is in $foo,
as long as only one pass of shell evaluation is involved. The shell
will treat the value of $foo as one not-further-interpreted command
argument.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, nospam-pg-abuse@bloodgate.com, ilmari@ilmari.org, vitus@wagner.pp.ru
Subject: Re: Non-portable shell code in pg_upgrade tap tests
In-Reply-To: <25533.1532215208@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox