Re: [PATCH] Add inline comments to the pg_hba_file_rules view

From: David Zhang <david(dot)zhang(at)highgo(dot)ca>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add inline comments to the pg_hba_file_rules view
Date: 2023-09-08 23:52:03
Message-ID: dcd7925f-b141-c9a8-444d-74446cf6d943@highgo.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is a very useful feature. I applied the patch to the master branch,
and both make check and make check-world passed without any issues.

Just one comment here, based on the example below,

> host db jim 127.0.0.1/32 md5 #     #foo#
>
> ... it returns the following pg_hba_file_rules records:
>
> postgres=#  SELECT type, database, user_name, address, comment
>  FROM pg_hba_file_rules
>  WHERE user_name[1]='jim';
>
>  type | database | user_name |  address  | comment
> ------+----------+-----------+-----------+---------
>  host | {db}     | {jim}     | 127.0.0.1 | #foo#

Since "only the first #" and "any leading spaces" are removed, IMO, it
can be more accurate to say,

Text after the first <literal>#</literal> comment character in the end
of a valid <literal>pg_hba.conf</literal> entry, if any

Best regards,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2023-09-09 01:33:14 Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases
Previous Message Álvaro Hernández 2023-09-08 23:24:02 Re: Possibility to disable `ALTER SYSTEM`