From 38ac3386377b3f336d33fc771a0caed78c84566c Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 8 Mar 2018 01:42:26 -0500 Subject: [PATCH] only first element of text array was being used for the json key --- deploy/ubm_schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/ubm_schema.sql b/deploy/ubm_schema.sql index 20ca8f1..104085b 100644 --- a/deploy/ubm_schema.sql +++ b/deploy/ubm_schema.sql @@ -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;