psql variables in the DO command

Поиск
Список
Период
Сортировка
От Pavel Luzanov
Тема psql variables in the DO command
Дата
Msg-id 5bae153c-ade4-ad24-bd46-857993240cfd@postgrespro.ru
обсуждение исходный текст
Ответы Re: psql variables in the DO command
Список pgsql-general
Hello,

I can't use psql variable in the DO command. Is it intentional behavior?

postgres=# \set var 'Hello, World!'

postgres=# do $$begin raise notice '%', :'var'; end;$$;

ERROR:  syntax error at or near ":"

LINE 1: do $$begin raise notice '%', :'var'; end;$$;

                                      ^


-- 

-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Łukasz Jarych
Дата:
Сообщение: Requiring pass and database psql shell command
Следующее
От: James Keener
Дата:
Сообщение: Re: Requiring pass and database psql shell command