From f9e1dac6c39e1f3a383d10ee4bb2ccc843337fda Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 25 Sep 2018 14:03:06 -0400 Subject: [PATCH] coalesce --- schema/functions/rollforward.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/functions/rollforward.sql b/schema/functions/rollforward.sql index be064d1..672a89e 100644 --- a/schema/functions/rollforward.sql +++ b/schema/functions/rollforward.sql @@ -116,7 +116,7 @@ BEGIN UPDATE evt.fspr f SET - prop = f.prop || '{"rf":"global"}'::jsonb + prop = COALESCE(f.prop,'{}'::jsonb) || '{"rf":"global"}'::jsonb FROM touched t WHERE