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

From: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "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: 2014-06-30 07:06:46
Message-ID: 20140630070646.GY31357@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2014-06-29 22:25:54 +0530, ams(at)2ndQuadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-06-30 07:22:13 Re: SQL access to database attributes
Previous Message Pavel Stehule 2014-06-30 06:53:56 Re: psql: show only failed queries