pgsql: Make GetConfigOption/GetConfigOptionResetString return "" for NU

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make GetConfigOption/GetConfigOptionResetString return "" for NU
Дата
Msg-id E1qya0r-003brC-Tk@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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-uyFDnNSa1z0EsDQQ@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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: pgsql: Attempt to stabilize postgres_fdw tests
Следующее
От: David Rowley
Дата:
Сообщение: pgsql: Stabilize postgres_fdw tests on 32-bit machines