Skip site navigation (1) Skip section navigation (2)

Re: per-user pg_service.conf

From: Christoph Berg <cb(at)df7cb(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: per-user pg_service.conf
Date: 2010-01-15 12:37:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> > I was surprised/annoyed to find out that there is no way to have
> > per-user pg_service.conf, something like ~/.pg_service.conf (well,
> > except by export PGSYSCONFDIR).  That would be easy to add.
> > Comments?
> Here's a patch.  Perhaps those who had said they would like that can
> validate the behavior.


I just tried the ~/.pg_service.conf patch and it does everything I'd
expect from it. It even improves the documentation to include a
services file example for which I had been looking several times

There's not much I have to add, maybe the documentation could add a
pointer to what keywords are recognized:

| The file uses an "INI file" format where the section name is the
| service name and the parameters are connection parameters.

... (see Section 30.1 for a list).

Independently for what this patch changes, error reporting could be
more detailed, currently "syntax error in service file \"%s\", line
%d" is reported for "no = in line" and "keyword X is unknown". The
latter case deserves a different message, maybe like "keyword \"%s\"
is invalid in service file \"%s\", line %d".

Even without the proposed changed, I'd very much appreciate the patch
getting included.

cb(at)df7cb(dot)de |

In response to


pgsql-hackers by date

Next:From: Michael MeskesDate: 2010-01-15 13:19:30
Subject: Re: ECPG DESCRIBE [OUTPUT] support
Previous:From: Heikki LinnakangasDate: 2010-01-15 12:27:38
Subject: Re: Streaming replication, loose ends

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group