Re: BUG #17736: when psql -c is used, the $ sign is escaped

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: BUG #17736: when psql -c is used, the $ sign is escaped
Дата
Msg-id CAFBsxsGGKROx00dp7g2W_7hCsxoFnz9ezU09ZFB8L61WGb9v1A@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17736: when psql -c is used, the $ sign is escaped  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs

On Wed, Jan 4, 2023 at 5:00 PM PG Bug reporting form <noreply@postgresql.org> wrote:
> Because $ is escaped, the results are different when the same command is
> executed in psql and internally.
> I would like to ask how to solve this problem, or why there is this
> difference?

When passing a quoted argument to psql, it is necessary to account for the shell's interpretation, for example:

$ echo "foo $1"
foo

$ echo "foo \$1"
foo $1

--
John Naylor
EDB: http://www.enterprisedb.com

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17736: when psql -c is used, the $ sign is escaped
Следующее
От: Sandeep Thakkar
Дата:
Сообщение: Re: BUG #17733: ERROR: could not load library "/Users/frank/postgres/postgresql-13.9/lib/postgresql/llvmjit.so": dl