Index: openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-4.7d4-4.7d5.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-4.7d4-4.7d5.sql,v
diff -u -r1.2 -r1.2.22.1
--- openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-4.7d4-4.7d5.sql	8 Feb 2003 20:03:33 -0000	1.2
+++ openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-4.7d4-4.7d5.sql	5 Sep 2014 16:29:49 -0000	1.2.22.1
@@ -72,24 +72,31 @@
  values ('TH_TH', 'Thai (TH)', 'th', 'TH', 'THAI', 'THAILAND', 'TH8TISASCII', 'TIS-620', 't');
 
 -- Forgot to add this locale earlier, some installations may have it already
-create function inline_0 ()
-returns integer as '
-declare
+
+
+--
+-- procedure inline_0/0
+--
+CREATE OR REPLACE FUNCTION inline_0(
+
+) RETURNS integer AS $$
+DECLARE
   v_locale_exists_p integer;
-begin
+BEGIN
 	select count(*) into v_locale_exists_p 
-	from ad_locales where locale = ''sv_SE'';
+	from ad_locales where locale = 'sv_SE';
 
-	if v_locale_exists_p = ''0'' then
+	if v_locale_exists_p = '0' then
 	insert into ad_locales 
        	(locale, label, language, country, nls_language, nls_territory, 
         	nls_charset, mime_charset, default_p)
- 	values (''sv_SE'', ''Swedish (SE)'', ''sv'', ''SE'', ''SWEDISH'', ''SWEDEN'', 
-	        ''WE8ISO8859P1'', ''ISO-8859-1'', ''t'');
+ 	values ('sv_SE', 'Swedish (SE)', 'sv', 'SE', 'SWEDISH', 'SWEDEN', 
+	        'WE8ISO8859P1', 'ISO-8859-1', 't');
 	end if;
 
 	return 1;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 select inline_0 ();
 drop function inline_0 ();
