From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: DB alias ? |
Date: | 2013-01-23 20:54:21 |
Message-ID: | 20130123205421.GI4249@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Gauthier, Dave wrote:
> Problem: Some users (scripts actually) try to connect to a DB who's name is derived from environmental variables. The DB doesn't exist (yet), and I want them to connect to a different DB for the time being. Is there a way to define an alias for the existing DB that = the db name that doesn't exist? Or is there a way to have PG fail over to a default DB should a DB connect fail? I can implement the fail over outside PG, but those users who make a direct connect to 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
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2013-01-23 21:04:19 | Re: DB alias ? |
Previous Message | Gauthier, Dave | 2013-01-23 20:45:53 | DB alias ? |