From a1a7bb8f16cd5529d76850c85625039ad7aa348a Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 7 Nov 2022 12:31:38 +0900 Subject: Move code related to configuration files in directories to new file The code in charge of listing and classifying a set of configuration files in a directory was located in guc-file.l, being used currently for GUCs under "include_dir". This code is planned to be used for an upcoming feature able to include configuration files for ident and HBA files from a directory, similarly to GUCs. In both cases, the file names, suffixed by ".conf", have to be ordered alphabetically. This logic is moved to a new file, called conffiles.c, so as it is easier to share this facility between GUCs and the HBA/ident parsing logic. Author: Julien Rouhaud, Michael Paquier Discussion: https://postgr.es/m/Y2IgaH5YzIq2b+iR@paquier.xyz --- src/include/utils/conffiles.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/include/utils/conffiles.h (limited to 'src/include') diff --git a/src/include/utils/conffiles.h b/src/include/utils/conffiles.h new file mode 100644 index 00000000000..3f23a2a011b --- /dev/null +++ b/src/include/utils/conffiles.h @@ -0,0 +1,23 @@ +/*-------------------------------------------------------------------- + * conffiles.h + * + * Utilities related to configuration files. + * + * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/utils/conffiles.h + * + *-------------------------------------------------------------------- + */ +#ifndef CONFFILES_H +#define CONFFILES_H + +extern char *AbsoluteConfigLocation(const char *location, + const char *calling_file); +extern char **GetConfFilesInDir(const char *includedir, + const char *calling_file, + int elevel, int *num_filenames, + char **err_msg); + +#endif /* CONFFILES_H */ -- cgit v1.2.3