Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql,v
diff -u -r1.16.2.4 -r1.16.2.5
--- openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql	16 Feb 2003 02:17:06 -0000	1.16.2.4
+++ openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql	18 Feb 2003 01:43:54 -0000	1.16.2.5
@@ -10,10 +10,23 @@
 -- TRIGGERS --
 --------------
 
+drop trigger membership_rels_in_tr on membership_rels;
+drop function membership_rels_in_tr ();
+
 -- The insert trigger was dummied up in groups-create.sql, so we just need
--- to replace the trigger function, not create the trigger
+-- to replace the trigger function, not create the trigger.
 
-create or replace function membership_rels_in_tr () returns opaque as '
+-- However, PG 7.3 introduces a new type "trigger" for the return type
+-- needed for functions called by triggers.  "create function" transmorgifies
+-- the return type "opaque" to "trigger" so PG 7.2 dumps can be restored into
+-- PG 7.3.  But "create or replace" doesn't do it.   We can't use "trigger"
+-- because we currently are still supporting PG 7.2.  Isn't life a pleasure?
+
+-- I'm leaving the triggers we aren't overriding as "create or replace" because
+-- this will be the right thing to do if the PG folks fix this problem or when
+-- we drop support of PG 7.2 and no longer need to declare these as type "opaque"
+
+create function membership_rels_in_tr () returns opaque as '
 declare
   v_object_id_one acs_rels.object_id_one%TYPE;
   v_object_id_two acs_rels.object_id_two%TYPE;
@@ -69,6 +82,9 @@
 
 end;' language 'plpgsql';
 
+create trigger membership_rels_in_tr after insert  on membership_rels
+for each row execute procedure membership_rels_in_tr ();
+
 create or replace function membership_rels_up_tr () returns opaque as '
 declare
   map             record;
