Re: Allow continuations in "pg_hba.conf" files

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Allow continuations in "pg_hba.conf" files
Дата
Msg-id 20200402055819.GD14618@telsasoft.com
обсуждение исходный текст
Ответ на Re: Allow continuations in "pg_hba.conf" files  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: Allow continuations in "pg_hba.conf" files
Список pgsql-hackers
On Thu, Apr 02, 2020 at 07:25:36AM +0200, Fabien COELHO wrote:
> 
> Hello,
> 
> > FWIW, I don't think so. Generally a trailing backspace is an escape
> > character for the following newline.  And '\ ' is a escaped space,
> > which is usualy menas a space itself.
> > 
> > In this case escape character doesn't work generally and I think it is
> > natural that a backslash in the middle of a line is a backslash
> > character itself.
> 
> I concur: The backslash char is only a continuation as the very last
> character of the line, before cr/nl line ending markers.
> 
> There are no assumption about backslash escaping, quotes and such, which
> seems reasonable given the lexing structure of the files, i.e. records of
> space-separated words, and # line comments.

Quoting does allow words containing spaces:

https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
|A record is made up of a number of fields which are separated by spaces and/or
|tabs. Fields can contain white space if the field value is double-quoted.
|Quoting one of the keywords in a database, user, or address field (e.g., all or
|replication) makes the word lose its special meaning, and just match a
|database, user, or host with that name.

-- 
Justin



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WAL usage calculation patch
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: User Interface for WAL usage data