summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Paquier2022-11-07 03:31:38 +0000
committerMichael Paquier2022-11-07 03:31:38 +0000
commita1a7bb8f16cd5529d76850c85625039ad7aa348a (patch)
tree268d50b855f614ffef92ec6e6d1de2120180dad6 /src/include
parentb0b72c64a0ce7bf5dd78a80b33d85c89c943ad0d (diff)
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/conffiles.h23
1 files changed, 23 insertions, 0 deletions
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 */