Christopher Browne cbbrowne at ca.afilias.info
Mon Aug 10 11:59:32 PDT 2009
Mark Hagger <mark.hagger at mxdata.co.uk> writes:
> That script works fine for me and the output looks good, although unless I missed something I had to modify it slightly to allow setting of the postgres host,user,port and database name for the varioous psql commands, ie making them things like:<BR>
> <BR>
> &nbsp;&nbsp;&nbsp; RESULTSET=`psql $pgargs -qtA -F &quot;:&quot; -R &quot; &quot; -c &quot;${QUERY}&quot; $pgdb`<BR>
> <BR>
> where pgargs=&quot;-h hostname -U username -p port&quot;<BR>
> and&nbsp; pgdb=&quot;dbname&quot;<BR>

Ah.  

The script assumes the use of the standard libpq environment variables
to control things:
 - PGPORT
 - PGHOST
 - PGDATABASE
 - PGUSER

That way, you can connect however you like without there ever being
any need to touch the script.
-- 
let name="cbbrowne" and tld="ca.afilias.info" in String.concat "@" [name;tld];;
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
"Bother,"  said Pooh,  "Eeyore, ready  two photon  torpedoes  and lock
phasers on the Heffalump, Piglet, meet me in transporter room three"


More information about the Slony1-general mailing list