Index: openacs-4/packages/acs-kernel/sql/postgresql/site-node-object-map-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/site-node-object-map-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-kernel/sql/postgresql/site-node-object-map-create.sql	7 Jun 2008 20:28:52 -0000	1.5
+++ openacs-4/packages/acs-kernel/sql/postgresql/site-node-object-map-create.sql	7 Jul 2011 10:46:02 -0000	1.6
@@ -24,12 +24,17 @@
 
 select define_function_args('site_node_object_map__new', 'object_id,node_id');
 
-create function site_node_object_map__new (integer,integer)
-returns integer as '
-declare
-    p_object_id                     alias for $1;
-    p_node_id                       alias for $2;
-begin
+
+
+--
+-- procedure site_node_object_map__new/2
+--
+CREATE OR REPLACE FUNCTION site_node_object_map__new(
+   p_object_id integer,
+   p_node_id integer
+) RETURNS integer AS $$
+DECLARE
+BEGIN
     perform site_node_object_map__del(p_object_id);
 
     insert
@@ -39,20 +44,27 @@
     (p_object_id, p_node_id);
 
     return 0;
-end;
-' language 'plpgsql';
+END;
 
+$$ LANGUAGE plpgsql;
+
 select define_function_args('site_node_object_map__del', 'object_id');
 
-create function site_node_object_map__del (integer)
-returns integer as '
-declare
-    p_object_id                     alias for $1;
-begin
+
+
+--
+-- procedure site_node_object_map__del/1
+--
+CREATE OR REPLACE FUNCTION site_node_object_map__del(
+   p_object_id integer
+) RETURNS integer AS $$
+DECLARE
+BEGIN
     delete
     from site_node_object_mappings
     where object_id = p_object_id;
 
     return 0;
-end;
-' language 'plpgsql';
+END;
+
+$$ LANGUAGE plpgsql;
