Hi all, It seems the behaviour of the ‹command / -c option is such that it will ignore any variables set on the command-line.
:~ psql --variable TESTVAR='123' --command 'select :TESTVAR;' ERROR: syntax error at or near ":" LINE 1: select :TESTVAR; ^ :~$ psql --variable TESTVAR='123' psql (9.1.9) Type "help" for help. timk=> select :TESTVAR; ?column? ---------- 123 (1 row) Obviously, there are ways around this, but is this expected behaviour? Tim