Re: Providing catalog view to pg_hba.conf file - Patch submission - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: Providing catalog view to pg_hba.conf file - Patch submission
Date
Msg-id 20140630070646.GY31357@toroid.org
Whole thread Raw
In response to Re: Providing catalog view to pg_hba.conf file - Patch submission  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Responses Re: Providing catalog view to pg_hba.conf file - Patch submission  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Re: Providing catalog view to pg_hba.conf file - Patch submission  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
At 2014-06-29 22:25:54 +0530, ams@2ndQuadrant.com wrote:
>
> I think the really right thing to do would be to have two separate
> columns, one with "all", "sameuser", "samerole", "replication", or
> empty; and the other an array of database names.

After sleeping on it, I realised that the code would return '{all}' for
'all' in pg_hba.conf, but '{"all"}' for '"all"'. So it's not exactly
ambiguous, but I don't think it's especially useful for callers.

I think having two columns would work. The columns could be called
"database" and "database_list" and "user" and "user_list" respectively.

The database column may contain one of "all", "sameuser", "samegroup",
"replication", but if it's empty, database_list will contain an array of
database names. Then ("all", {}) and ("", {all}) are easily separated.
Likewise for user and user_list.

I've marked this patch "returned with feedback" and moved it to the
August CF after discussion with Vaishnavi.

-- Abhijit



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: psql: show only failed queries
Next
From: Pavel Stehule
Date:
Subject: Re: SQL access to database attributes