Re: Proposal: wildcards in pg_service.conf

From: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
To: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: wildcards in pg_service.conf
Date: 2008-02-29 00:46:22
Message-ID: 758d5e7f0802281646l37111b00pcc81d501144b0d10@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 28, 2008 at 11:27 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> The LDAP case is the main motivation why I would like to have
> wildcards, so that all our databases could be handled with one
> entry in the service file. Currently we have to add an entry to the
> file for every new database we want to access.

I am very much +1 for it. I think it would be very useful.

> Do you think that the idea of wildcards for the service file
> is a bad one in general?
>
> Or could there be a more generally useful realization of that
> concept?

The use of [%] in pg_service.conf is well... ugly. :) (At the same time
I would have come up with exactly the same idea for the syntax...)

As for LDAP string expansion I think it would be convenient to
provide a subset of log_line_prefix %x expansions, like:

%u User name
%d Database name
%r Remote host name or IP address, and remote port
%h Remote host name or IP address
%% Literal %

...I am not sure if %r or %h is a good idea. Thoughts?

As for the syntax of configuration file, using [%] implies that things
like [proj%db] would also be valid, which would be harder to implement.

Perhaps empty bracers [] would be better? Ugly aswell, but would not
suggest you can use [pr%db%test] and expect it to work. And could
be made as 'last match' regardless of the in-file order.

Regards,
Dawid

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Smith 2008-02-29 01:54:38 "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables
Previous Message Sam Mason 2008-02-29 00:09:45 Re: UUID data format 4x-4x-4x-4x-4x-4x-4x-4x