Re: [BUGS] pg_service.conf ignores dbname parameter

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Michael Fuhr <mfuhr(at)fuhr(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] pg_service.conf ignores dbname parameter
Date: 2003-12-18 17:44:17
Message-ID: 20815.1071769457@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Regardless of this particular issue, I think it would be useful if,
> under some conditions to be identified, some service were taken as
> default if nothing is specied in libpq. That would eliminate the need
> to set environment variables, which is undesirable in many situations.

That's a thought. Maybe if pg_service.conf exists and contains a
section named "default", we use whatever settings are present there?
(Obviously we'd not want the dbname to be forced by this, but I think
we've already agreed to get rid of that behavior.)

About the only downside I can see to this is that every connection
would incur the overhead of an attempted file opening. That might be
thought to be too much overhead, at least by people who have no use
for the feature. But in comparison to what will happen on the server
side during backend startup, it's probably pretty negligible.

BTW, why is it that pg_service.conf is system-wide? Personally I'd
think it more useful to seek settings in ~/.pg_service.conf.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Lewis Foti 2003-12-18 19:17:12 Jdbc connection pooling and PG 7.4 consistently fails
Previous Message Peter Eisentraut 2003-12-18 17:32:25 Re: [BUGS] pg_service.conf ignores dbname parameter

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2003-12-18 17:48:14 Re: replace all with * in pg_hba.conf
Previous Message Peter Eisentraut 2003-12-18 17:32:25 Re: [BUGS] pg_service.conf ignores dbname parameter