summaryrefslogtreecommitdiff
path: root/src/include/utils/guc.h
diff options
context:
space:
mode:
authorTom Lane2022-10-14 16:26:39 +0000
committerTom Lane2022-10-14 16:26:39 +0000
commit3057465acfbea2f3dd7a914a1478064022c6eecd (patch)
tree63de056985ef04bedf14c1baab0c53ebb3f7c326 /src/include/utils/guc.h
parent407b50f2d421bca5b134a0033176ea8f8c68dc6b (diff)
Replace the sorted array of GUC variables with a hash table.
This gets rid of bsearch() in favor of hashed lookup. The main advantage is that it becomes far cheaper to add new GUCs, since we needn't re-sort the pointer array. Adding N new GUCs had been O(N^2 log N), but now it's closer to O(N). We need to sort only in SHOW ALL and equivalent functions, which are hopefully not performance-critical to anybody. Also, merge GetNumConfigOptions() into get_guc_variables(), because in a world where the set of GUCs isn't fairly static you really want to consider those two results as tied together not independent. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r--src/include/utils/guc.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index c8b65c5bb8f..b3aaff9665b 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -390,7 +390,6 @@ extern int set_config_option_ext(const char *name, const char *value,
extern void AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt);
extern char *GetConfigOptionByName(const char *name, const char **varname,
bool missing_ok);
-extern int GetNumConfigOptions(void);
extern void ProcessGUCArray(ArrayType *array,
GucContext context, GucSource source, GucAction action);