dump trigeer into alternate table

This commit is contained in:
Paul Trowbridge 2018-09-22 12:37:30 -04:00
parent 70f0cd363b
commit c015405ce4

View File

@ -279,7 +279,7 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger
SELECT * FROM rf
)
INSERT INTO
evt.bal (acct, fspr, obal, debits, credits, cbal)
evt.balx (acct, fspr, obal, debits, credits, cbal)
SELECT
acct
,id
@ -288,12 +288,7 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger
,credits
,cbal
FROM
seq
ON CONFLICT ON CONSTRAINT bal_pk DO UPDATE SET
obal = EXCLUDED.obal
,debits = EXCLUDED.debits
,credits = EXCLUDED.credits
,cbal = EXCLUDED.cbal;
seq;
RETURN NULL;
END;
$func$;