only first element of text array was being used for the json key

This commit is contained in:
Paul Trowbridge 2018-03-08 01:42:26 -05:00
parent cce644740d
commit 38ac338637

View File

@ -161,7 +161,7 @@ BEGIN
FOREACH t SLICE 1 IN ARRAY key_list LOOP
--RAISE NOTICE '%', t;
--RAISE NOTICE '%', t[1];
j := j || jsonb_build_object(t[1],rec#>t);
j := j || jsonb_build_object(t::text,rec#>t);
END LOOP;
RETURN j;
END;