summaryrefslogtreecommitdiff
path: root/src/include/common
diff options
context:
space:
mode:
authorJoe Conway2016-02-17 17:12:06 +0000
committerJoe Conway2016-02-17 17:12:06 +0000
commita5c43b886942e96ec5c745041f2d6a50c3205147 (patch)
treeb7d1967286366131bc65d34457fb0ba91ec710b8 /src/include/common
parentf1f5ec1efafe74ca45e24e0bf3371b1d6985c8ee (diff)
Add new system view, pg_config
Move and refactor the underlying code for the pg_config client application to src/common in support of sharing it with a new system information SRF called pg_config() which makes the same information available via SQL. Additionally wrap the SRF with a new system view, as called pg_config. Patch by me with extensive input and review by Michael Paquier and additional review by Alvaro Herrera.
Diffstat (limited to 'src/include/common')
-rw-r--r--src/include/common/config_info.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/common/config_info.h b/src/include/common/config_info.h
new file mode 100644
index 00000000000..649ef5cf4be
--- /dev/null
+++ b/src/include/common/config_info.h
@@ -0,0 +1,21 @@
+/*
+ * config_info.h
+ * Common code for pg_config output
+ *
+ * Copyright (c) 2016, PostgreSQL Global Development Group
+ *
+ * src/include/common/config_info.h
+ */
+#ifndef COMMON_CONFIG_INFO_H
+#define COMMON_CONFIG_INFO_H
+
+typedef struct ConfigData
+{
+ char *name;
+ char *setting;
+} ConfigData;
+
+extern ConfigData *get_configdata(char *my_exec_path,
+ size_t *configdata_len);
+
+#endif /* COMMON_CONFIG_INFO_H */