From: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_hba_file_settings view patch |
Date: | 2016-09-05 07:09:53 |
Message-ID: | CAJrrPGfPiBRyibqy27Gnzcpvy0WUtwRNrGDsayuZPV9eG9uVow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Sep 4, 2016 at 1:44 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 15 August 2016 at 12:17, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
> wrote:
>
> > comments?
>
> This looks like a good feature contribution, thanks.
>
> At present the patch doesn't apply cleanly, please rebase.
>
Rebased patch is attached.
> The patch doesn't contain any tests, which means I can't see what the
> output looks like, so I can't judge the exact usefulness of this
> particular patch. ISTM likely that there will be some detailed points
> to review in there somewhere.
>
Added a test in the regress and also in the docs.
Do we want line number, or priority order? i.e. do we want to count
> comment lines or just main rule lines? I prefer latter.
> Various other questions along those lines needed, once I can see the
> output.
>
I preferred the line number that includes the comment lines also. This way
it
will be easy to edit the file if it contains any errors by directly going
to that line
number.
> What is push_jsonb_string_value() etc..?
> If there is required infrastructure there is no explanation of why.
> Suggest you explain and/or split into two.
>
I added a JSONB type column to display the hba.conf options values.
To store the options data into JSONB format, currently i didn't find any
functions that are available to use in the core. So I added key/value
functions to add the data into JSONB object.
The functions related code is split into a different patch and attached.
> pg_hba_file_settings seems a clumsy name. I'd prefer pg_hba_settings,
> since that name could live longer than the concept of pg_hba.conf,
> which seems likely to become part of ALTER SYSTEM in future, so we
> wouldn't really want the word "file" in there.
>
Yes, I also agree that *file* is not required. The hba rules are not
available
in memory also in the backends. I changed the view name to pg_hba_rules
as per the other mail from Christoph.
Regards,
Hari Babu
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
pg_hba_rules_1.patch | application/octet-stream | 45.9 KB |
jsonb_utilitiy_funcs_1.patch | application/octet-stream | 2.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Christian Ullrich | 2016-09-05 07:19:36 | Re: Parallel build with MSVC |
Previous Message | Heikki Linnakangas | 2016-09-05 07:05:29 | Re: Better locale-specific-character-class handling for regexps |