From 7f59452298b2395ea0770accb21c473dff35573c Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 24 Sep 2018 16:48:08 -0400 Subject: [PATCH] work on doing a roll-forward inside gl trigger --- schema/triggers/gl_insert.sql | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/schema/triggers/gl_insert.sql b/schema/triggers/gl_insert.sql index 5952427..f636270 100644 --- a/schema/triggers/gl_insert.sql +++ b/schema/triggers/gl_insert.sql @@ -5,18 +5,15 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger AS $func$ DECLARE - _lastid ltree; _lastdur tstzrange; _newdur tstzrange; BEGIN --get last global rollforward SELECT - id - ,dur + dur INTO - _lastid - ,_lastdur + _lastdur FROM evt.fspr WHERE