Index: openacs-4/packages/tsearch2-driver/sql/postgresql/tsearch2-driver-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/sql/postgresql/tsearch2-driver-package-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/tsearch2-driver/sql/postgresql/tsearch2-driver-package-create.sql	6 Jun 2004 20:31:55 -0000	1.1
+++ openacs-4/packages/tsearch2-driver/sql/postgresql/tsearch2-driver-package-create.sql	30 Mar 2013 18:50:29 -0000	1.2
@@ -1,24 +1,33 @@
-create or replace function ts2_to_tsvector ( varchar, varchar ) returns varchar as '
-declare
-ts2_cfg alias for $1;
-ts2_txt alias for $2;
+--
+-- procedure ts2_to_tsvector/2
+--
+CREATE OR REPLACE FUNCTION ts2_to_tsvector ( 
+       ts2_cfg varchar, 
+       ts2_txt varchar 
+) RETURNS varchar AS $$
+DECLARE
 ts2_result varchar;
-begin
+BEGIN
+	perform set_curcfg(ts2_cfg);
+	select to_tsvector(ts2_cfg,ts2_txt) into ts2_result;
+	return ts2_result;
+END;
+$$ language plpgsql;
 
-perform set_curcfg(ts2_cfg);
-select to_tsvector(ts2_cfg,ts2_txt) into ts2_result;
-return ts2_result;
-end;' language 'plpgsql';
-
-create or replace function ts2_to_tsquery ( varchar, varchar ) returns tsquery as '
-declare
-ts2_cfg alias for $1;
-ts2_txt alias for $2;
+--
+-- procedure ts2_to_tsquery/2
+--
+CREATE OR REPLACE FUNCTION ts2_to_tsquery ( 
+       ts2_cfg varchar, 
+       ts2_txt varchar 
+) RETURNS tsquery AS $$
+DECLARE
 ts2_result tsquery;
-begin
-perform set_curcfg(ts2_cfg);
-select 1 into ts2_result;
-select to_tsquery(ts2_cfg,ts2_txt) into ts2_result;
-return ts2_result;
-end;' language 'plpgsql';
+BEGIN
+	perform set_curcfg(ts2_cfg);
+	select 1 into ts2_result;
+	select to_tsquery(ts2_cfg,ts2_txt) into ts2_result;
+	return ts2_result;
+END;
+$$ LANGUAGE plpgsql;
 
