Re: DB alias ? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: DB alias ?
Date
Msg-id 20130123205421.GI4249@alvh.no-ip.org
Whole thread Raw
In response to DB alias ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
Gauthier, Dave wrote:
> Problem:  Some users (scripts actually) try to connect to a DB who's name is derived from environmental variables.
TheDB doesn't exist (yet), and I want them to connect to a different DB for the time being.  Is there a way to define
analias for the existing DB that = the db name that doesn't exist?    Or is there a way to have PG fail over to a
defaultDB should a DB connect fail?  I can implement the fail over outside PG, but those users who make a direct
connectto the DB don't use that code. 

This has been requested previously.  Probably the only reason it hasn't
gotten done yet is that nobody has cooked up a patch.  Searching the
archives for "database synonyms" might be fruitful.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: DB alias ?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: DB alias ?