summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/manual/sl-stack.tex (renamed from doc/manual/sl-stack.latex)0
-rwxr-xr-xsql/Pg-functions.sql16
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/manual/sl-stack.latex b/doc/manual/sl-stack.tex
index 209bfd35..209bfd35 100644
--- a/doc/manual/sl-stack.latex
+++ b/doc/manual/sl-stack.tex
diff --git a/sql/Pg-functions.sql b/sql/Pg-functions.sql
index 4ae22270..4eea5011 100755
--- a/sql/Pg-functions.sql
+++ b/sql/Pg-functions.sql
@@ -252,3 +252,19 @@ END;
' language 'plpgsql';
-- end function
--
+CREATE OR REPLACE FUNCTION trigger_parts_short() RETURNS TRIGGER
+AS
+'
+
+CREATE OR REPLACE FUNCTION trigger_parts_short() RETURNS TRIGGER
+AS
+BEGIN
+ IF NEW.onhand >= NEW.rop THEN
+ NOTIFY parts_short;
+ END IF;
+ RETURN NEW;
+END;
+' LANGUAGE PLPGSQL;
+
+CREATE TRIGGER parts_short AFTER UPDATE ON parts
+FOR EACH ROW EXECUTE PROCEDURE trigger_parts_short();