Re: How to get variable out to shell script
| От | Greg Smith |
|---|---|
| Тема | Re: How to get variable out to shell script |
| Дата | |
| Msg-id | alpine.GSO.2.01.0909231637210.26451@westnet.com обсуждение |
| Ответ на | Re: How to get variable out to shell script (Abel Camarillo <acamari@the00z.org>) |
| Список | pgsql-general |
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@gregsmith.com http://www.gregsmith.com Baltimore, MD
В списке pgsql-general по дате отправления: