remove create table

This commit is contained in:
Paul Trowbridge 2018-03-10 01:47:26 -05:00
parent 15e5001a89
commit 5dd2091752

View File

@ -1,3 +1,4 @@
DO $F$ DO $F$
DECLARE _t text; DECLARE _t text;
DECLARE _c text; DECLARE _c text;
@ -75,9 +76,9 @@ BEGIN
EXECUTE _t; EXECUTE _t;
drop table if exists tps.x; --drop table if exists tps.x;
create table tps.x as --create table tps.x as
( --(
WITH WITH
-------------extract the limiter fields to one row per source---------------------------------- -------------extract the limiter fields to one row per source----------------------------------
@ -98,10 +99,13 @@ BEGIN
,pending_list AS ( ,pending_list AS (
SELECT SELECT
tps.jsonb_extract( jsonb_build_object(
row_to_json(i)::jsonb 'input_constraint',
,ext.text_array tps.jsonb_extract(
) json_key, row_to_json(i)::jsonb
,ext.text_array
)
) json_key,
row_to_json(i)::JSONB rec, row_to_json(i)::JSONB rec,
srce, srce,
--ae.rn, --ae.rn,
@ -214,8 +218,9 @@ BEGIN
FROM FROM
logged; logged;
--RAISE NOTICE 'import logged under id# %, info: %', _log_id, _log_info; RAISE NOTICE 'import logged under id# %, info: %', _log_id, _log_info;
/*
_message:= _message:=
( (
format( format(
@ -226,11 +231,15 @@ BEGIN
} }
$$, _path, _srce)::jsonb $$, _path, _srce)::jsonb
)||jsonb_build_object('details',_log_info); )||jsonb_build_object('details',_log_info);
select * from pending_keys
) with data; RAISE NOTICE '%s',_message;
*/
--select * from pending_keys
--) with data;
end; end;
$F$; $F$;
/*
SELECT SELECT
JSONB_PRETTY(k.json_key) orig, JSONB_PRETTY(k.json_key) orig,
jsonb_pretty(jsonb_build_object('input_constraint',k.json_key)) uq, jsonb_pretty(jsonb_build_object('input_constraint',k.json_key)) uq,
@ -238,4 +247,5 @@ SELECT
FROM FROM
tps.x k tps.x k
left outer JOIN tps.trans t ON left outer JOIN tps.trans t ON
t.rec @> k.json_key; t.rec @> k.json_key;
*/