dump trigeer into alternate table
This commit is contained in:
parent
70f0cd363b
commit
c015405ce4
@ -279,7 +279,7 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger
|
|||||||
SELECT * FROM rf
|
SELECT * FROM rf
|
||||||
)
|
)
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
evt.bal (acct, fspr, obal, debits, credits, cbal)
|
evt.balx (acct, fspr, obal, debits, credits, cbal)
|
||||||
SELECT
|
SELECT
|
||||||
acct
|
acct
|
||||||
,id
|
,id
|
||||||
@ -288,12 +288,7 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger
|
|||||||
,credits
|
,credits
|
||||||
,cbal
|
,cbal
|
||||||
FROM
|
FROM
|
||||||
seq
|
seq;
|
||||||
ON CONFLICT ON CONSTRAINT bal_pk DO UPDATE SET
|
|
||||||
obal = EXCLUDED.obal
|
|
||||||
,debits = EXCLUDED.debits
|
|
||||||
,credits = EXCLUDED.credits
|
|
||||||
,cbal = EXCLUDED.cbal;
|
|
||||||
RETURN NULL;
|
RETURN NULL;
|
||||||
END;
|
END;
|
||||||
$func$;
|
$func$;
|
||||||
|
Loading…
Reference in New Issue
Block a user