[EMAIL PROTECTED] ("Jasbinder Bali") writes: > in my bash script where and how do i specify the database connection > parameters
There are three ways: 1. You can store them in environment variables: PGDATABASE=my_database PGPORT=8901 PGUSER=superman PGHOST=some.host.somewhere export PGDATABASE PGPORT PGUSER PGHOST 2. You can specify them in command line parameters: psql -h some.host.somewhere -p 8901 -U superman -d my_database 3. You could specify a service name PGSERVICE=my_fave_db psql where the pg_service.conf in your PostgreSQL installation contains an entry: [my_fave_db] dbname=my_database user=superman host=some.host.somewhere port=8901 4. You can mix these; perhaps start by having PGSERVICE provide part of the information, then environment variables may add to/override some of that, then command line parameters may add to/override further... For a lot of our production environments, we have set up a big, comprehensive pg_service.conf file; local accounts then pick favorite values for PGSERVICE... -- let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];; http://cbbrowne.com/info/lsf.html "Why use Windows, since there is a door?" -- <[EMAIL PROTECTED]> Andre Fachat ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings