X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 9D5159DC9E8 for ; Sat, 18 Feb 2006 14:52:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94133-06 for ; Sat, 18 Feb 2006 14:52:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.94.225]) by postgresql.org (Postfix) with ESMTP id 6E32B9DC9DE for ; Sat, 18 Feb 2006 14:52:22 -0400 (AST) Received: from kleptog by svana.org with local (Exim 4.50) id 1FAXBu-0006cF-Uv for pgsql-hackers@postgresql.org; Sun, 19 Feb 2006 05:52:23 +1100 Date: Sat, 18 Feb 2006 19:52:22 +0100 From: Martijn van Oosterhout To: pgsql-hackers@postgresql.org Subject: Config file for psql Message-ID: <20060218185222.GG20716@svana.org> Reply-To: Martijn van Oosterhout Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gm5TwAJMO0F2iVRz" Content-Disposition: inline X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.123 required=5 tests=[AWL=0.123] X-Spam-Score: 0.123 X-Spam-Level: X-Archive-Number: 200602/710 X-Sequence-Number: 79848 --gm5TwAJMO0F2iVRz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =2Enetrc file. Thoughts? --=20 Martijn van Oosterhout 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. --gm5TwAJMO0F2iVRz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFD92zmIB7bNG8LQkwRApZuAJ0W9SEQ5tZu6HMb7yNXQlfOvUdj2gCfcu6f KnIxhF6HFyaqWyNjDFjlSG4= =9reE -----END PGP SIGNATURE----- --gm5TwAJMO0F2iVRz--