On Sun, 20 Sep 2009, Abel Camarillo wrote:
#!/bin/sh
dbname=
user=
password=
In general it's better to use the .pgpass/PGPASSFILE mechanism:
http://www.postgresql.org/docs/current/static/libpq-pgpass.html
to cache passwords like this, if you can't eliminate the need for them
altogether through pg_hba.conf adjustments. That way, when you do change
the database user's password, there's only one place to update for all of
your scripts that talk to the database as that user. It's better still to
parameterize all of these connection things into a global configuration
file, but now you're talking an extra bit of coding; pgpass support you
basically get for free in your app if it's talking to the database with
psql.
--
* Greg Smith gsmith@xxxxxxxxxxxxx http://www.gregsmith.com Baltimore, MD
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general