On Wed, 15 Oct 2025 at 15:20, Peter Eisentraut <[email protected]> wrote:

> On 06.10.25 20:05, Jacob Champion wrote:
> > I started on a proof of concept and very quickly hit a fork. Do I
> > 1) introduce a completely new config file, or
> > 2) adapt pg_service.conf to this use case?
>
> I've been thinking about this kind of thing for a long time, and my
> intuition has always been to have some kind of [default] section in
> pg_service.conf.  That would probably be relatively easy.
>

Maybe have a way to specify one or more "base" configurations for each
service?

Something like (except please don't use the "extends" keyword, I've done
enough Java already; pick some punctuation instead):

[default]
sslmode=require

[dev]
host=dev.postgres.example.com

[service1] extends default
host=postgres.example.com
user=appuser

[service2] extends default
host=postgres2.example.com
user=otherappuser

[service1-dev] extends default, dev
user=appuser

I don't know how big a deal it is that this is no longer an "INI" file.

Reply via email to