Re: Providing catalog view to pg_hba.conf file - Patch submission

From: Greg Stark <stark(at)mit(dot)edu>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Prabakaran, Vaishnavi" <vaishnavip(at)fast(dot)au(dot)fujitsu(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Date: 2015-03-16 18:11:10
Message-ID: CAM-w4HMN1Mg9Xawms35grfw7kGPLCn_mtu4d_Le6AQNe3T1E0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 16, 2015 at 5:46 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> ​Why not just leave the double-quoting requirements intact. An unquoted
> <any> or <sameuser> (etc) would represent the special keyword while the
> quoted version would mean that the name is used literally.
>

For users that would be worse than not quoting. Then if they look up users
they can't say WHERE username =ANY (users). They would have to do
sumersaults like CASE WHEN username = 'all' then '"all"' =ANY (users) else
username =ALL (users).

The whole point of having a view should be that you don't need to know the
syntax rules for pg_hba.conf to interpret the data. If you do then you
might as well just write a parser and read the file.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-03-16 18:38:34 Re: assessing parallel-safety
Previous Message Robert Haas 2015-03-16 18:08:23 Re: Providing catalog view to pg_hba.conf file - Patch submission