Another possible, but
inconvenient workaround - constructing the right string before execution:
postgres=# \set var 'Hello, World!'
postgres=# \set cmd '$$begin raise notice ''%'', ' :'var' '; end;$$;'
postgres=# do :cmd;
NOTICE: Hello, World!
DO
-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On 05.03.2018 17:02, Pavel Luzanov wrote:
On 05.03.2018 16:56, Pavel Stehule wrote:
Yes, now I understand this. But at first glance this is not an obvious behavior.
-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company