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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Add inline comments to the pg_hba_file_rules view
Дата
Msg-id ZQUsoaxQhDFcvmkZ@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] Add inline comments to the pg_hba_file_rules view  (Jim Jones <jim.jones@uni-muenster.de>)
Ответы Re: [PATCH] Add inline comments to the pg_hba_file_rules view  (Jim Jones <jim.jones@uni-muenster.de>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Erik Rijkers
Дата:
Сообщение: Re: JSON Path and GIN Questions
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Add 'worker_type' to pg_stat_subscription