Search Postgresql Archives

Re: database name aliases?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We use the pg_services.conf file.
 
http://www.postgresql.org/docs/8.1/static/libpq-pgservice.html
 
In the file you can point the alias to whatever db you want.  To connect:
 
[bash]$ PGSERIVCE=dbname psql
 
Woody
IGLASS Networks


From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Reece Hart
Sent: Monday, November 06, 2006 6:07 PM
To: pgsql-general
Subject: [GENERAL] database name aliases?

I'd like to be able to have several versions of a database available concurrently and one database alias that refers to the most recent of these.  For example:

dbname_1-1
dbname_1-2
dbname_1-3
dbname -> dbname_1-3

and
$ psql -d dbname
would connect to dbname_1-3.

Any ideas?

Thanks,
Reece

-- 
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux