From 73db72760d4e414ac9b9c86a672a8eab0cea752c Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 26 Feb 2018 23:58:21 -0500 Subject: [PATCH] refernce tps schema on UDF and fix bad function reference --- deploy/ubm_schema.sql | 4 ++-- functions/srce_import.pgsql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/ubm_schema.sql b/deploy/ubm_schema.sql index 8cd8d33..2f12333 100644 --- a/deploy/ubm_schema.sql +++ b/deploy/ubm_schema.sql @@ -223,7 +223,7 @@ BEGIN ,pending_list AS ( SELECT - jsonb_extract( + tps.jsonb_extract( row_to_json(i)::jsonb ,ext.text_array ) json_key, @@ -343,7 +343,7 @@ BEGIN "message":"import of %L for source %L complete" } $$, _path, _srce)::jsonb - )||josnb_build_object('details',_log_info); + )||jsonb_build_object('details',_log_info); RETURN _message; END diff --git a/functions/srce_import.pgsql b/functions/srce_import.pgsql index fb5253e..657161f 100644 --- a/functions/srce_import.pgsql +++ b/functions/srce_import.pgsql @@ -128,7 +128,7 @@ BEGIN ,pending_list AS ( SELECT - jsonb_extract( + tps.jsonb_extract( row_to_json(i)::jsonb ,ext.text_array ) json_key, @@ -248,7 +248,7 @@ BEGIN "message":"import of %L for source %L complete" } $$, _path, _srce)::jsonb - )||josnb_build_object('details',_log_info); + )||jsonb_build_object('details',_log_info); RETURN _message; END