when setting the map regex, retain the whole json being supplied

This commit is contained in:
Paul Trowbridge 2018-06-01 13:37:14 -04:00
parent 5e2b6ee59d
commit 0e028af435
3 changed files with 3 additions and 3 deletions

View File

@ -361,7 +361,7 @@ BEGIN
--map name
,ae.r->>'name'
--map definition
,ae.r->'regex'
,ae.r
--map aggregation sequence
,(ae.r->>'sequence')::INTEGER
--history definition

View File

@ -20,7 +20,7 @@ BEGIN
--map name
,ae.r->>'name'
--map definition
,ae.r->'regex'
,ae.r
--map aggregation sequence
,(ae.r->>'sequence')::INTEGER
--history definition

View File

@ -12,7 +12,7 @@ BEGIN
_path:= ARRAY['schemas',_schema]::text[];
--_srce:= 'dcard';
SELECT
'DROP VIEW IF EXISTS tpsv.'||_srce||'_'||_path[2]||'; CREATE VIEW tpsv.'||_srce||'_'||_path[2]||' AS SELECT id, logid, '||string_agg('(allj#>>'''||r.PATH::text||''')::'||r.type||' AS "'||r.column_name||'"',', ')||' FROM tps.trans WHERE srce = '''||_srce||''';'
'DROP VIEW IF EXISTS tpsv.'||_srce||'_'||_path[2]||'; CREATE VIEW tpsv.'||_srce||'_'||_path[2]||' AS SELECT id, logid, allj, '||string_agg('(allj#>>'''||r.PATH::text||''')::'||r.type||' AS "'||r.column_name||'"',', ')||' FROM tps.trans WHERE srce = '''||_srce||''';'
INTO
_sql
FROM