Index: openacs-4/packages/acs-kernel/acs-kernel.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/acs-kernel.info,v diff -u -N -r1.136.2.35 -r1.136.2.36 --- openacs-4/packages/acs-kernel/acs-kernel.info 5 Oct 2017 10:25:28 -0000 1.136.2.35 +++ openacs-4/packages/acs-kernel/acs-kernel.info 20 Dec 2018 10:06:04 -0000 1.136.2.36 @@ -9,15 +9,15 @@ f t - + OpenACS Core Team Routines and data models providing the foundation for OpenACS-based Web services. 2017-08-06 OpenACS The OpenACS kernel contains the core datamodel create and drop scripts for such things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures. 3 - + Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.2d1-5.9.2d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/Attic/upgrade-5.9.2d1-5.9.2d2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.2d1-5.9.2d2.sql 20 Dec 2018 10:06:04 -0000 1.1.2.1 @@ -0,0 +1,45 @@ +-- PG11 compatibility +-- +-- procedure trigger_type/1 +-- +CREATE OR REPLACE FUNCTION trigger_type( + tgtype integer +) RETURNS varchar AS $$ +DECLARE + description varchar; + sep varchar; +BEGIN + + if (tgtype & 2) > 0 then + description := 'BEFORE '; + else + description := 'AFTER '; + end if; + + sep := ''; + + if (tgtype & 4) > 0 then + description := description || 'INSERT '; + sep := 'OR '; + end if; + + if (tgtype & 8) > 0 then + description := description || sep || 'DELETE '; + sep := 'OR '; + end if; + + if (tgtype & 16) > 0 then + description := description || sep || 'UPDATE '; + sep := 'OR '; + end if; + + if (tgtype & 1) > 0 then + description := description || 'FOR EACH ROW'; + else + description := description || 'STATEMENT'; + end if; + + return description; + +END; +$$ LANGUAGE plpgsql IMMUTABLE;