Index: openacs-4/packages/forums/sql/postgresql/upgrade/upgrade-1.2.0d4-1.3d1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/upgrade/upgrade-1.2.0d4-1.3d1.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/forums/sql/postgresql/upgrade/upgrade-1.2.0d4-1.3d1.sql 8 Aug 2006 21:26:51 -0000 1.2 +++ openacs-4/packages/forums/sql/postgresql/upgrade/upgrade-1.2.0d4-1.3d1.sql 12 Aug 2013 09:34:31 -0000 1.3 @@ -1,16 +1,23 @@ -- Update the package ids for projects -create function inline_0 () -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ct RECORD; -begin +BEGIN for ct in select package_id, forum_id from forums_forums loop update acs_objects set package_id = ct.package_id where object_id = ct.forum_id; end loop; return null; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0();