convert map definintion set to take only a json
This commit is contained in:
parent
6de5ece3d0
commit
ad2a7ed68d
@ -1,4 +1,4 @@
|
||||
CREATE OR REPLACE FUNCTION tps.srce_map_def_set(_srce text, _map text, _defn jsonb, _seq int) RETURNS jsonb
|
||||
CREATE OR REPLACE FUNCTION tps.srce_map_def_set(_defn jsonb) RETURNS jsonb
|
||||
AS
|
||||
$f$
|
||||
|
||||
@ -15,15 +15,15 @@ BEGIN
|
||||
INSERT INTO
|
||||
tps.map_rm
|
||||
SELECT
|
||||
_srce
|
||||
,_map
|
||||
_defn->>'srce'
|
||||
,_defn->>'name'
|
||||
,_defn
|
||||
,_seq
|
||||
,_defn->>'sequence'
|
||||
ON CONFLICT ON CONSTRAINT map_rm_pk DO UPDATE SET
|
||||
srce = _srce
|
||||
,target = _map
|
||||
srce = _defn->>'srce'
|
||||
,target = _defn->>'name'
|
||||
,regex = _defn
|
||||
,seq = _seq;
|
||||
,seq = _defn->>'sequence';
|
||||
|
||||
EXCEPTION WHEN OTHERS THEN
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
"srce":"dcard",
|
||||
"sequence":1,
|
||||
"defn": [
|
||||
{
|
||||
"key": "{Description}",
|
||||
|
Loading…
Reference in New Issue
Block a user