Index: openacs-4/packages/news/sql/postgresql/upgrade/upgrade-5.2.0d5-5.2.0d6.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/upgrade/upgrade-5.2.0d5-5.2.0d6.sql,v
diff -u -r1.2 -r1.2.10.1
--- openacs-4/packages/news/sql/postgresql/upgrade/upgrade-5.2.0d5-5.2.0d6.sql	8 Aug 2006 21:27:04 -0000	1.2
+++ openacs-4/packages/news/sql/postgresql/upgrade/upgrade-5.2.0d5-5.2.0d6.sql	2 Nov 2013 16:08:07 -0000	1.2.10.1
@@ -7,13 +7,22 @@
 -- @cvs-id $Id$
 --
 
-create or replace function news__clone (integer, integer)
-returns integer as '
-declare
- p_old_package_id   alias for $1;   --default null,
- p_new_package_id   alias for $2;   --default null
+
+
+-- added
+select define_function_args('news__clone','old_package_id,new_package_id');
+
+--
+-- procedure news__clone/2
+--
+CREATE OR REPLACE FUNCTION news__clone(
+   p_old_package_id integer, --default null,
+   p_new_package_id integer  --default null
+
+) RETURNS integer AS $$
+DECLARE
  one_news		record;	 
-begin
+BEGIN
         for one_news in select
                             publish_date,
                             cr.content as text,
@@ -72,5 +81,6 @@
 
         end loop;
  return 0;
-end;
-' language 'plpgsql';
+END;
+
+$$ LANGUAGE plpgsql;
