Re: Non-portable shell code in pg_upgrade tap tests

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Non-portable shell code in pg_upgrade tap tests
Дата
Msg-id 25533.1532215208@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Non-portable shell code in pg_upgrade tap tests  ("Tels" <nospam-pg-abuse@bloodgate.com>)
Список pgsql-hackers
"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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: Remove psql's -W option
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Remove psql's -W option