Re: pg_hba_file_settings view patch

Haribabu Kommi <kommi.haribabu@gmail.com>

From: Haribabu Kommi <kommi.haribabu@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Michael Paquier <michael.paquier@gmail.com>, Simon Riggs <simon@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-01-30T02:20:30Z
Lists: pgsql-hackers

Attachments

On Sun, Jan 29, 2017 at 9:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I wrote:
> > I spent awhile hacking on this, and made a lot of things better, but
> > I'm still very unhappy about the state of the comments.
>
> I made another pass over this, working on the comments and the docs,
> and changing the view name to "pg_hba_file_rules".  I think this version
> is committable if people are satisfied with that name.
>

Thanks for working on the patch. I am fine with the "pg_hba_file_rules"
name. I have to improve in writing better comments after checking the
attached patch. I will improve the comments in further patch submissions
to community.


> One loose end is what to do about testing.  I did not much like the
> proposed TAP tests.  We could just put "select count(*) > 0 from
> pg_hba_file_rules" into the main regression tests, which would provide
> some code coverage there, if not very much guarantee that what the view
> outputs is sane.
>

I added the test in main regression test to the patch which you shared based
on the mail of creating separate tests for system views in [1]. The
attached
needs to be applied on top the patch shared in [1].

[1] - https://www.postgresql.org/message-id/19359.1485723741%40sss.pgh.pa.us

Regards,
Hari Babu
Fujitsu Australia

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Invent pg_hba_file_rules view to show the content of pg_hba.conf.

  2. Restructure hba.c to replace 3 parallel lists with single list of structs.