From c015405ce411cee1fd5439f0bba8c151329e4022 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sat, 22 Sep 2018 12:37:30 -0400 Subject: [PATCH] dump trigeer into alternate table --- db_deploy.sql | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/db_deploy.sql b/db_deploy.sql index b4aca91..018334e 100644 --- a/db_deploy.sql +++ b/db_deploy.sql @@ -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$;