472,372 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 software developers and data experts.

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 1443

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: mike | last post by:
regards: Does each HTTP Request have "Host:" header? Any positive suggestion is welcome. thank you May goodness be with you all
by: Mike | last post by:
VB .NET 2003, Pocket PC 2003, CF 1.0 SP 2 Only when I use a proxy server, I'm getting this error when attempting to write data to a Stream object from an HTTPWebRequest object....
by: Ben | last post by:
I'm designing a fairly involved database system. As part fo the process, I use the \i command a great deal. I set up fairly involved queries, sometimes simply for the purpose of shortening column...
by: tj | last post by:
After reading the manual, it looks like you can run a query on a single command line. But I cant get it to work... Does this look right to anyone? > psql -d hostname -c "update table set...
by: Ennio-Sr | last post by:
Hi all! I'm writing a script that presents the user with a numbered lines menu, each line corresponding to a <case n> which executes a psql command. As the psql-commands are very similar to each...
by: Holger Klawitter | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there, I haven't found a way to set the client encoding of a psql connection other then "\encoding" which is arkward for batch processing. As...
by: srinu | last post by:
Hello, We had one webserver based on a linux machine. The website is fully function and designed by a different person. Now we moved the machine from one IP to another one. I changed the...
by: Benzi Eilon | last post by:
I am executing an Expand command in order to expand a CAB file. This is done by calling CreateProcess with the Expand command and then WaitForSingleObject and checking the process exit code. My C++...
by: Simon van Beek | last post by:
Dear reader, What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes, but by typing in the ComboBox it doesn't expand. Is this because the source of the ComboBox is a...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.