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

From Pavel Stehule
Subject Re: Providing catalog view to pg_hba.conf file - Patch submission
Date
Msg-id CAFj8pRCX8Y3LT7BZn9O++oSYfMZfh3+vJ=vOsBhs_cLp81yDzQ@mail.gmail.com
Whole thread Raw
In response to Re: Providing catalog view to pg_hba.conf file - Patch submission  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-hackers


2015-04-04 15:29 GMT+02:00 Haribabu Kommi <kommi.haribabu@gmail.com>:
On Sat, Apr 4, 2015 at 4:19 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> Hi
>
> 2015-03-31 14:38 GMT+02:00 Haribabu Kommi <kommi.haribabu@gmail.com>:
>>
>> keyword_databases - The database name can be "all", "replication",
>> sameuser", "samerole" and "samegroup".
>> keyword_roles - The role can be "all" and a group name prefixed with "+".
>
>
> I am not very happy about name - but I have no better idea :( - maybe
> "database_mask", "user_mask"
>

How about database_keywords and user_keywords as column names?

I am thinking, it is better than keyword_databases - it is more logical. But it is maybe question for mathematicians.

some other variant "database_filters" and "user_filters" or "database_predicates" and "user_predicates"

but it is not terrible nice too

Regards

Pavel
 

>>
>>
>> The rest of the database and role names are treated as normal database
>> and role names.
>>
>> 2. Added the code changes to identify the names with quoted.
>
>
> Is it a good idea? Database's names are not quoted every else (in system
> catalog). So now, we cannot to use join to this view.
>
> postgres=# select (databases)[1] from pg_hba_conf ;
>  databases
> -----------
>  "omega 2"
>
> (4 rows)
>
> postgres=# select datname from pg_database ;
>   datname
> -----------
>  template1
>  template0
>  postgres
>  omega 2
> (4 rows)
>
> I dislike this - we know, so the name must be quoted in file (without it,
> the file was incorrect). And if you need quotes, there is a function
> quote_ident. If we use quotes elsewhere, then it should be ok, bot not now.
> Please, remove it. More, it is not necessary, when you use a "keyword"
> columns.

Thanks. The special handling of quotes for pg_hba_conf is not required.
I will keep the behaviour similar to the other catalog tables.
I will remove the quote support in the next version.

Regards,
Hari Babu
Fujitsu Australia

pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Next
From: Tom Lane
Date:
Subject: Re: Abbreviated keys for Numeric