Re: PgHosts
От | Bruce Momjian |
---|---|
Тема | Re: PgHosts |
Дата | |
Msg-id | 200303071640.h27Ge7K17554@candle.pha.pa.us обсуждение исходный текст |
Ответ на | PgHosts (Medi Montaseri <medi.montaseri@intransa.com>) |
Список | pgsql-general |
Actually, we do have that on the client end with pg_service.conf. It wasn't documented in current releases but will be in 7.4. Documentation is: <term><literal>service</literal></term> <listitem> <para> Service name to use for additional parameters. It specifies a service name in pg_service.conf that holds additional connection parameters. This allows applications to specify only a service name so connection parameters can be centrally maintained. See <filename><replaceable>PREFIX</>/share/pg_service.conf.sample</> for information on how to set up the file. </para> I am attaching the pg_services.conf.sample file that will appear in 7.4. It only does connection params, not schema/table stuff. --------------------------------------------------------------------------- Medi Montaseri wrote: > I posted this question a few days ago when people were talking about PG > 7.4 (or later) > features....but I guess it was not posted (processed, etc)...so here it > is again... > > I am wondering if it is possible for Pg to support a feature (as in > Informix) where > I can have a host mapping configuration file such that > > db = { host, database } > or > schema = { host, database, schema} > or > table = { host, database, schema, table } > > Currently one has to resolve (or switch) at connect time where to > connect to, but with this > switching layer, the application can help out a bit on the HA... > > Thanks > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 # # Connection configuration file # # A service is a set of named connection parameters. You may specify # multiple services in this file. Each starts with a service name in # brackets. Subsequent lines have connection configuration parameters of # the pattern "param=value". A sample configuration for template1 is # included in this file. If no database name is specified, it is assumed # to match the service name. Lines beginning with '#' are comments. # # Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and # rename it pg_service.conf. # # #[template1] #user=postgres
В списке pgsql-general по дате отправления: