From 360934c0f7cf9e2e0bf86272207b3b9cd878be26 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 12 Sep 2006 14:46:23 +0000 Subject: New sl-stack changes extensions Added parts notify trigger to pg-functions.sql git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@74 4979c152-3d1c-0410-bac9-87ea11338e46 --- doc/manual/sl-stack.latex | 31 ------------------------------- doc/manual/sl-stack.tex | 31 +++++++++++++++++++++++++++++++ sql/Pg-functions.sql | 16 ++++++++++++++++ 3 files changed, 47 insertions(+), 31 deletions(-) delete mode 100644 doc/manual/sl-stack.latex create mode 100644 doc/manual/sl-stack.tex diff --git a/doc/manual/sl-stack.latex b/doc/manual/sl-stack.latex deleted file mode 100644 index 209bfd35..00000000 --- a/doc/manual/sl-stack.latex +++ /dev/null @@ -1,31 +0,0 @@ -\setlength{\unitlength}{3947sp}% -% -\begingroup\makeatletter\ifx\SetFigFont\undefined% -\gdef\SetFigFont#1#2#3#4#5{% - \reset@font\fontsize{#1}{#2pt}% - \fontfamily{#3}\fontseries{#4}\fontshape{#5}% - \selectfont}% -\fi\endgroup% -\begin{picture}(4824,4824)(3589,-5173) -\thinlines -{\color[rgb]{0,0,0}\put(3601,-1261){\framebox(4800,900){}} -}% -{\color[rgb]{0,0,0}\put(6001,-3961){\framebox(2400,1200){}} -}% -{\color[rgb]{0,0,0}\put(3601,-5161){\framebox(4800,1200){}} -}% -{\color[rgb]{0,0,0}\put(3601,-2761){\framebox(4800,1500){}} -}% -{\color[rgb]{0,0,0}\put(3601,-3961){\framebox(2400,1200){}} -}% -\put(7201,-3361){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}PostgreSQL}% -}}} -\put(6001,-4561){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Operating System}% -}}} -\put(6001,-811){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}SQL-Ledger}% -}}} -\put(4201,-3361){\makebox(0,0)[lb]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Apache}% -}}} -\put(6001,-1936){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Perl}% -}}} -\end{picture} diff --git a/doc/manual/sl-stack.tex b/doc/manual/sl-stack.tex new file mode 100644 index 00000000..209bfd35 --- /dev/null +++ b/doc/manual/sl-stack.tex @@ -0,0 +1,31 @@ +\setlength{\unitlength}{3947sp}% +% +\begingroup\makeatletter\ifx\SetFigFont\undefined% +\gdef\SetFigFont#1#2#3#4#5{% + \reset@font\fontsize{#1}{#2pt}% + \fontfamily{#3}\fontseries{#4}\fontshape{#5}% + \selectfont}% +\fi\endgroup% +\begin{picture}(4824,4824)(3589,-5173) +\thinlines +{\color[rgb]{0,0,0}\put(3601,-1261){\framebox(4800,900){}} +}% +{\color[rgb]{0,0,0}\put(6001,-3961){\framebox(2400,1200){}} +}% +{\color[rgb]{0,0,0}\put(3601,-5161){\framebox(4800,1200){}} +}% +{\color[rgb]{0,0,0}\put(3601,-2761){\framebox(4800,1500){}} +}% +{\color[rgb]{0,0,0}\put(3601,-3961){\framebox(2400,1200){}} +}% +\put(7201,-3361){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}PostgreSQL}% +}}} +\put(6001,-4561){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Operating System}% +}}} +\put(6001,-811){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}SQL-Ledger}% +}}} +\put(4201,-3361){\makebox(0,0)[lb]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Apache}% +}}} +\put(6001,-1936){\makebox(0,0)[b]{\smash{\SetFigFont{17}{20.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}Perl}% +}}} +\end{picture} 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(); -- cgit v1.2.3