NULL handling in exconfig deconstruction

Поиск
Список
Период
Сортировка
Искать

NULL handling in exconfig deconstruction

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
Вложения:
In extension_config_remove() we first ensure that pg_extension.extconfig cannot
contain any NULL values in the array, ERRORing out if so.  Later we however ask
for NULL values back when deconstructing the array, throwing away the results
knowing there wont be any, which seems superfluous (and wrong if there indeed
were any).  The attached patch signals to deconstruct_array() that any NULL
values should be considered an error instead of returned, to keep NULL value
handling consistent (and shave two small allocations off).

cheers ./daniel

Re: NULL handling in exconfig deconstruction

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Daniel Gustafsson  writes:
> In extension_config_remove() we first ensure that pg_extension.extconfig cannot
> contain any NULL values in the array, ERRORing out if so.  Later we however ask
> for NULL values back when deconstructing the array, throwing away the results
> knowing there wont be any, which seems superfluous (and wrong if there indeed
> were any).  The attached patch signals to deconstruct_array() that any NULL
> values should be considered an error instead of returned, to keep NULL value
> handling consistent (and shave two small allocations off).

LGTM, pushed.

			regards, tom lane

FAQ