Re: BUG #18061: The psql -v variable option does not work for the -c command option

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #18061: The psql -v variable option does not work for the -c command option
Дата
Msg-id CAKFQuwag6FeVC7fPO=cTGt_iOTy7rnum48cgHCn0p83xr+MLeA@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #18061: The psql -v variable option does not work for the -c command option  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18061: The psql -v variable option does not work for the -c command option
Список pgsql-bugs
On Sun, Aug 20, 2023 at 8:56 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18061
Logged by:          Robert Greene
Email address:      robertmccollistergreene@hotmail.com
PostgreSQL version: 15.4
Operating system:   Windows, Linux
Description:       

psql -v v1=1 -c "select col from table where colname=:v1;"

Yes, since psql variables are not parsable by the server the following sentence in the documentation for -c explains your observation:

> command must be either a command string that is completely parsable by the server (i.e., it contains no psql-specific features), or a single backslash command.

David J.

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

Предыдущее
От: ocean_li_996
Дата:
Сообщение: Re:RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder()
Следующее
От: James Inform
Дата:
Сообщение: Re: BUG #18060: Left joining rows using random() function in join condition doesn't work as expected.