470,647 Members | 1,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

psql: How to make :HOST expand in a "\!" command?

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,


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

Jul 19 '05 #1
0 1401

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Holger Klawitter | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.