This works as expected,
\set x '''2\n3'''
but this doesn't
\set x '''2
3'''
Is there a workaround for later example so I don't have to use \n
instead of newline?
1 Answer 1
To answer my own question, the \gset
command should be used for multiline variable content,
select '''2
3''' x \gset
lang-sql
psql
commands are oneliners (including\copy
, being the only one that annoys me regularly). If you tell us the purpose of this, we might come up with a better idea.\gset
is probably able to handle this.