On Mon, Feb 20, 2006 at 02:36:42PM +0100, Albe Laurenz wrote: > Dear developers of PostgreSQL! > > We (City of Vienna) have many Oracle databases, but plan to use > PostgreSQL for our future database installations as much as possible. > The following idea is inspired by Oracle. > > We sometimes need to move a database from one machine to another > (hardware old/broken, upgrades, etc.). Now whenever a database is > moved to a different computer, all the clients have to address the > database at the new hostname.
Perhaps you should look into pg_service.conf. It's a configuration file such that in your connect line you can say: PQconnect("service=production"); and in the config file you say: [production] host=db1 port=5434 dbname=main It's not quite as nice as LDAP to be sure, but it might work well enough for your config. For example, you could write a program to generate that file from an LDAP database. Hope this helps, -- Martijn van Oosterhout <kleptog@svana.org> 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.
signature.asc
Description: Digital signature