I have a SQL script that needs to invoke a non-SQL command, so I'm using ...
\! some_cmd arg arg arg
However, when the SQL script is invoked for a different PostgreSQL host,
e.g.,
$ psql -h HOSTNAME -f SCRIPTNAME
the :HOST variable is set correctly, but there doesn't seem to be a way
to pass :HOST to the external command. That is,
\! PGHOST=:HOST some_cmd arg arg arg
fails because ":HOST" is not expanded.
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise