isolate issue with source not being inserted
This commit is contained in:
parent
1d9532395b
commit
908a63b1c7
@ -12,6 +12,7 @@ DECLARE
|
|||||||
_PG_EXCEPTION_DETAIL text;
|
_PG_EXCEPTION_DETAIL text;
|
||||||
_PG_EXCEPTION_HINT text;
|
_PG_EXCEPTION_HINT text;
|
||||||
_rebuild BOOLEAN;
|
_rebuild BOOLEAN;
|
||||||
|
_list text;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
WITH
|
WITH
|
||||||
@ -40,11 +41,12 @@ BEGIN
|
|||||||
SELECT
|
SELECT
|
||||||
f.srce
|
f.srce
|
||||||
,f.actn
|
,f.actn
|
||||||
,COALESCE(setd.message, deld.message) message
|
,COALESCE(setd.message, '{"message":"not inserted"}'::jsonb/*deld.message*/) message
|
||||||
FROM
|
FROM
|
||||||
_full f
|
_full f
|
||||||
LEFT JOIN LATERAL tps.srce_set(defn) setd(message) ON f.actn = 'SET'
|
LEFT JOIN LATERAL tps.srce_set(defn) setd(message) ON f.actn = 'SET'
|
||||||
LEFT JOIN LATERAL tps.srce_delete(defn) deld(message) ON f.actn = 'DELETE'
|
--dual left joins for functions that touch the same table causes the first left join actions to be undone
|
||||||
|
--LEFT JOIN LATERAL tps.srce_delete(defn) deld(message) ON f.actn = 'DELETE'
|
||||||
)
|
)
|
||||||
--aggregate all the messages into one message
|
--aggregate all the messages into one message
|
||||||
----
|
----
|
||||||
@ -57,8 +59,14 @@ BEGIN
|
|||||||
FROM
|
FROM
|
||||||
_do;
|
_do;
|
||||||
|
|
||||||
|
SELECT string_agg(srce,',') INTO _list FROM tps.srce;
|
||||||
|
RAISE NOTICE 'multi source list: %', _list;
|
||||||
|
|
||||||
RETURN _message;
|
RETURN _message;
|
||||||
|
|
||||||
|
SELECT string_agg(srce,',') INTO _list FROM tps.srce;
|
||||||
|
RAISE NOTICE 'after return: %', _list;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EXCEPTION WHEN OTHERS THEN
|
EXCEPTION WHEN OTHERS THEN
|
||||||
|
Loading…
Reference in New Issue
Block a user