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 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$;