How to concatenate psql variables?
\set path '/tmp/'
\set file 'foo'
\set pf :path:file \echo :pf
/tmp/foo


Why does this work? I quote the manual here:


  \set [ name [ value [ ... ] ] ]
  
  Sets the internal variable name to value or, if more than one value is given, to the concatenation of all of them. [...]


Emphasis mine.