public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Jim Jones <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: David Zhang <[email protected]>
Subject: Re: [PATCH] Add inline comments to the pg_hba_file_rules view
Date: Sat, 16 Sep 2023 13:18:41 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Fri, Sep 15, 2023 at 09:37:23AM +0200, Jim Jones wrote:
> SELECT type, database, user_name, address, c.comment
> FROM pg_hba_file_rules h, pg_read_conf_comments(h.file_name) c
> WHERE user_name[1]='jim' AND h.line_number = c.line_number ;
>
> type | database | user_name | address | comment
> ------+----------+-----------+-----------+---------
> host | {db} | {jim} | 127.0.0.1 | foo
> host | {db} | {jim} | 127.0.0.1 | bar
> host | {db} | {jim} | 127.0.0.1 | #foo#
> (3 rows)
>
>
> Is it more or less what you had in mind?
That was the idea. I forgot about strpos(), but if you do that, do we
actually need a function in core to achieve that? There are a few
fancy cases with the SQL function you have sent, actually.. strpos()
would grep the first '#' character, ignoring quoted areas.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PATCH] Add inline comments to the pg_hba_file_rules view
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox