Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fh1Aw-0003gY-3U for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Jul 2018 23:20:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fh1Ar-0006EU-KQ for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Jul 2018 23:20:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fh1Ar-0006EL-DX for pgsql-hackers@lists.postgresql.org; Sat, 21 Jul 2018 23:20:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fh1Aj-0001Hm-DV for pgsql-hackers@postgresql.org; Sat, 21 Jul 2018 23:20:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6LNK8mb025534; Sat, 21 Jul 2018 19:20:08 -0400 From: Tom Lane To: "Tels" cc: =?utf-8?B?IkRhZ2Zpbm4gSWxtYXJpIE1hbm5zw6VrZXIi?= , "Victor Wagner" , "pgsql-hackers" Subject: Re: Non-portable shell code in pg_upgrade tap tests 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> <4263.1532186967@sss.pgh.pa.us> <4aca1a4e7e8e82513988a7236e227c2d.squirrel@sm.webmail.pair.com> Comments: In-reply-to "Tels" message dated "Sat, 21 Jul 2018 18:49:33 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25532.1532215208.1@sss.pgh.pa.us> Date: Sat, 21 Jul 2018 19:20:08 -0400 Message-ID: <25533.1532215208@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Tels" 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