pgsql: Use AbsoluteConfigLocation() when building an included path in h

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Use AbsoluteConfigLocation() when building an included path in h
Дата
Msg-id E1osYQP-000Et7-BL@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Use AbsoluteConfigLocation() when building an included path in hba.c

The code building an absolute path to a file included, as prefixed by
'@' in authentication files, for user and database lists uses the same
logic as for GUCs, except that it has no need to know about DataDir as
there is always a calling file to rely to build the base directory path.
The refactoring done in a1a7bb8 makes this move straight-forward, and
unifies the code used for GUCs and authentication files, and the
intention is to rely also on that for the upcoming patch to be able to
include full files from HBA or ident files.

Note that this gets rid of an inconsistency introduced in 370f909, that
copied the logic coming from GUCs but applied it for files included in
authentication files, where the result buffer given to
join_path_components() must have a size of MAXPGPATH.  Based on a
double-check of the existing code, all the other callers of
join_path_components() already do that, except the code path changed
here.

Discussion: https://postgr.es/m/Y2igk7q8OMpg+Yta@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6bbd8b73857a337e3aba2f6cdcaca6355b4c2b51

Modified Files
--------------
src/backend/libpq/hba.c            | 17 ++---------------
src/backend/utils/misc/conffiles.c |  4 ++--
2 files changed, 4 insertions(+), 17 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: improve tutorial section about grouped aggregates.
Следующее
От: Thomas Munro
Дата:
Сообщение: pgsql: Provide sigaction() for Windows.