Index: openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.0d1-5.2.0d2.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.0d1-5.2.0d2.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.0d1-5.2.0d2.sql	24 Jul 2004 15:10:16 -0000	1.1
+++ openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.0d1-5.2.0d2.sql	30 Mar 2013 18:50:28 -0000	1.2
@@ -1,15 +1,25 @@
 -- alias missing from p_time decl.
-create or replace function timezone__get_abbrev (integer, timestamptz) returns varchar as '
-declare
-  p_tz_id alias for $1;
-  p_time alias for $2;
+
+
+-- added
+select define_function_args('timezone__get_abbrev','tz_id,time');
+
+--
+-- procedure timezone__get_abbrev/2
+--
+CREATE OR REPLACE FUNCTION timezone__get_abbrev(
+   p_tz_id integer,
+   p_time timestamptz
+) RETURNS varchar AS $$
+DECLARE
   v_abbrev timezone_rules.abbrev%TYPE;
-begin
-  v_abbrev := ''GMT'';
+BEGIN
+  v_abbrev := 'GMT';
 
   select abbrev into v_abbrev
   from   timezone_rules
   where  tz_id = p_tz_id and p_time between local_start and local_end;
 	 
   return v_abbrev;
-end;' language 'plpgsql' stable;
+END;
+$$ LANGUAGE plpgsql stable;
