Bug
FUNCTIONS_SQL parses proconfig with:
(string_to_array(unnest(proconfig), '='))[1] as param,
(string_to_array(unnest(proconfig), '='))[2] as value
Any config value that itself contains = (e.g. SET application_name TO 'api=worker') is truncated at the first extra =. Observed: application_name → api instead of api=worker.
This is the same class of bug as role config truncation (#1117), but in the functions catalog path — Studio list/retrieve/update-recreate of functions can corrupt GUC values that contain =.
Reproduce
create function public.config_eq_test() returns void
language sql set application_name to 'api=worker'
as $$ select 1; $$;
Then inspect config_params from GET /functions / functions.retrieve.
Expected
config_params.application_name === 'api=worker'
Suggested fix
Split on the first = only, e.g. split_part(cfg, '=', 1) + substring(cfg from position('=' in cfg) + 1) via lateral unnest(proconfig).
Bug
FUNCTIONS_SQLparsesproconfigwith:Any config value that itself contains
=(e.g.SET application_name TO 'api=worker') is truncated at the first extra=. Observed:application_name→apiinstead ofapi=worker.This is the same class of bug as role config truncation (#1117), but in the functions catalog path — Studio list/retrieve/update-recreate of functions can corrupt GUC values that contain
=.Reproduce
Then inspect
config_paramsfromGET /functions/functions.retrieve.Expected
config_params.application_name === 'api=worker'Suggested fix
Split on the first
=only, e.g.split_part(cfg, '=', 1)+substring(cfg from position('=' in cfg) + 1)vialateral unnest(proconfig).