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

Поиск
Список
Период
Сортировка
От Robert Greene
Тема Re: BUG #18061: The psql -v variable option does not work for the -c command option
Дата
Msg-id PH0PR12MB88248FA3E657FEE178DE8D16B61FA@PH0PR12MB8824.namprd12.prod.outlook.com
обсуждение исходный текст
Ответ на Re: BUG #18061: The psql -v variable option does not work for the -c command option  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
Rats

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android

From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Sunday, August 20, 2023 11:58:01 AM
To: robertmccollistergreene@hotmail.com <robertmccollistergreene@hotmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #18061: The psql -v variable option does not work for the -c command option
 
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 по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #18065: An error occurred when attempting to add a column of type "vector" to a table named "vector".
Следующее
От: Andres Freund
Дата:
Сообщение: Re: cache lookup failed dropping public schema with trgm index