Re: Allow file inclusion in pg_hba and pg_ident files
| От | Michael Paquier |
|---|---|
| Тема | Re: Allow file inclusion in pg_hba and pg_ident files |
| Дата | |
| Msg-id | Y1fPvQV387X/gVrK@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: Allow file inclusion in pg_hba and pg_ident files (Julien Rouhaud <rjuju123@gmail.com>) |
| Ответы |
Re: Allow file inclusion in pg_hba and pg_ident files
|
| Список | pgsql-hackers |
On Tue, Oct 25, 2022 at 03:08:59PM +0800, Julien Rouhaud wrote:
> On Tue, Oct 25, 2022 at 03:43:21PM +0900, Michael Paquier wrote:
>> Another advantage is that it minimizes the presence of the hardcoded
>> HbaFileName and IdentFileName in hba.c, which is one thing we are
>> trying to achieve here for the inclusion of more files. I found a bit
>> strange that IdentLine had no sourcefile, actually. We track the file
>> number but use it nowhere, and it seems to me that having more
>> symmetry between both would be a good thing.
>
> If IdentLine->linenumber is useless, why not get rid of it rather than tracking
> another useless info? Hba is much more structured so we need a more
> specialized struct, but I don't think ident will ever go that way.
Hmm. I would be tempted to keep track of the file name and the line
number as well in IdentLine. One reason is that this can become
useful for debugging. A second is that this can reduce a bit the
arguments of fill_ident_line() and fill_hba_line() in hbafuncs.c once
we track these in HbaLine and IdentLine. And HEAD is slightly
overdoing it in its interface for the line number, actually, as we
pass the line number twice: from {Ident,Hba}Line and the respective
field from TokenizedAuthLine.
--
Michael
Вложения
В списке pgsql-hackers по дате отправления: