public inbox for [email protected]  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <[email protected]>
To: [email protected]
Subject: Config file for psql
Date: Sat, 18 Feb 2006 19:52:22 +0100
Message-ID: <[email protected]> (raw)

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   <[email protected]>   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.


Attachments:

  [application/pgp-signature] signature.asc (189B, 2-signature.asc)
  download

view thread (8+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Config file for psql
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox