Make GetConfigOption/GetConfigOptionResetString return "" for NULL.
As per the preceding commit, GUC APIs generally expose NULL-valued string variables as empty strings. Extend that policy to GetConfigOption() and GetConfigOptionResetString(), eliminating a crash hazard for unwary callers, as well as a fundamental ambiguity in GetConfigOption()'s API. No back-patch, since this is an API change and conceivably somebody somewhere is depending on this corner case. Xing Guo, Aleksander Alekseev, Tom Lane Discussion: https://postgr.es/m/cacpmh+aydx5yuppaagzvwc1d8zfol4jod-uyfdnnsa1z0es...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0bc726d95a305ca923b1f284159f40f0d5cf5725 Modified Files -------------- src/backend/utils/misc/guc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
