update fspr to show roll was done
This commit is contained in:
parent
2374b060bd
commit
5ce69011c4
@ -84,6 +84,7 @@ BEGIN
|
||||
)
|
||||
select * from rf
|
||||
)
|
||||
,ins AS (
|
||||
INSERT INTO
|
||||
evt.bal
|
||||
SELECT
|
||||
@ -99,6 +100,22 @@ BEGIN
|
||||
obal = EXCLUDED.obal
|
||||
,debits = EXCLUDED.debits
|
||||
,credits = EXCLUDED.credits
|
||||
,cbal = EXCLUDED.cbal;
|
||||
,cbal = EXCLUDED.cbal
|
||||
RETURNING *
|
||||
)
|
||||
,touched AS (
|
||||
SELECT DISTINCT
|
||||
fspr
|
||||
FROM
|
||||
ins
|
||||
)
|
||||
UPDATE
|
||||
evt.fspr f
|
||||
SET
|
||||
prop = f.prop || '{"rf":"global"}'::jsonb
|
||||
FROM
|
||||
touched t
|
||||
WHERE
|
||||
t.fspr = f.id;
|
||||
END;
|
||||
$func$;
|
Loading…
Reference in New Issue
Block a user