Re: Issue with psqlrc with command line.

Поиск
Список
Период
Сортировка
От saurabh shelar
Тема Re: Issue with psqlrc with command line.
Дата
Msg-id CALBKi8am25N=8W6ejtnxShemjuu1Rds-+gbDe=648P0Dgy0JTw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issue with psqlrc with command line.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Issue with psqlrc with command line.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Hi David,

Thank you for the swift response.

However, could you please confirm if the below scenario is expected. 

- included the alias in the file.
- And passed the file with psql and it worked.

-bash-4.2$ cat test 
:testing

-bash-4.2$ /opt/PostgreSQL/9.6/bin/psql -f test 
 id 
----
  1


On Wed, Aug 29, 2018 at 8:44 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, August 29, 2018, saurabh shelar <saurabhshelar5@gmail.com> wrote:
As per the document from PG-9.6 it is possible. 

You cannot use psql variables with -c

“ 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-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Issue with psqlrc with command line.
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Issue with psqlrc with command line.