Config file for psql - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Config file for psql
Date
Msg-id 20060218185222.GG20716@svana.org
Whole thread Raw
Responses Re: Config file for psql
Re: Config file for psql
List pgsql-hackers
Hi,

A little while ago there was someone asking for tools to make it easier
to connect to multiple servers. It occured to me that it might be
useful to have a config file the way ssh does it:

Host production ServerName  db1 DBName      main Username    blah Password    blah UseSSL      yes

Host test ServerName db2 ServerPort 5434 DBName     main Username   blah Password   blah

Host * Username    default


So when you type "psql test" it fills in the server name, port,
database, username and password for you. For hosts not listed, it gives
a default username "default". It's really just a variation on the
.netrc file.

Thoughts?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Pgfoundry and gborg: shut one down
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Pgfoundry and gborg: shut one down