[Fusionforge-commits] r14582 - in branches/Branch_5_1: . src/db

Roland Mas lolando at fusionforge.org
Sat Oct 8 20:47:24 CEST 2011


Author: lolando
Date: 2011-10-08 20:47:24 +0200 (Sat, 08 Oct 2011)
New Revision: 14582

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/db/20111007-fti-aggregate-functions.sql
Log:
Rewrite ff_tsvector_add in plpgsql (rather than plain SQL) to avoid parsing problems

Modified: branches/Branch_5_1/src/db/20111007-fti-aggregate-functions.sql
===================================================================
--- branches/Branch_5_1/src/db/20111007-fti-aggregate-functions.sql	2011-10-08 10:34:51 UTC (rev 14581)
+++ branches/Branch_5_1/src/db/20111007-fti-aggregate-functions.sql	2011-10-08 18:47:24 UTC (rev 14582)
@@ -1,8 +1,10 @@
-CREATE OR REPLACE FUNCTION ff_tsvector_add (tsvector, tsvector)
+CREATE OR REPLACE FUNCTION ff_tsvector_add (v1 tsvector, v2 tsvector)
 RETURNS tsvector
-AS '
-   SELECT $1 || $2
-' LANGUAGE SQL
+AS $$
+BEGIN
+  RETURN v1 || v2 ;
+END;
+$$ LANGUAGE plpgsql
 IMMUTABLE
 RETURNS NULL ON NULL INPUT;
 




More information about the Fusionforge-commits mailing list