[open-ils-commits] r19762 - branches/rel_2_0/Open-ILS/src/sql/Pg (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 16 00:34:48 EDT 2011


Author: dbs
Date: 2011-03-16 00:34:45 -0400 (Wed, 16 Mar 2011)
New Revision: 19762

Modified:
   branches/rel_2_0/Open-ILS/src/sql/Pg/002.functions.aggregate.sql
Log:
Backport r19756 and r19758 for proper namespaces in aggregate functions

Schema creation and recreation tested with PostgreSQL 8.4 and 9.0 and
seems good. Fingers crossed.


Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/002.functions.aggregate.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/002.functions.aggregate.sql	2011-03-16 04:04:19 UTC (rev 19761)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/002.functions.aggregate.sql	2011-03-16 04:34:45 UTC (rev 19762)
@@ -21,7 +21,7 @@
 DROP AGGREGATE IF EXISTS public.first(anyelement) CASCADE;
 DROP AGGREGATE IF EXISTS public.last(anyelement) CASCADE;
 DROP AGGREGATE IF EXISTS public.agg_text(text) CASCADE;
-DROP AGGREGATE IF EXISTS public.agg_tsvector(tsvector) CASCADE;
+DROP AGGREGATE IF EXISTS public.agg_tsvector(pg_catalog.tsvector) CASCADE;
 
 CREATE AGGREGATE array_accum (
 	sfunc = array_append,
@@ -66,7 +66,7 @@
 	stype	 = text
 );
 
-CREATE OR REPLACE FUNCTION public.tsvector_concat ( tsvector, tsvector ) RETURNS tsvector AS $$
+CREATE OR REPLACE FUNCTION tsvector_concat ( tsvector, tsvector ) RETURNS pg_catalog.tsvector AS $$
 SELECT
 	CASE	WHEN $1 IS NULL
 			THEN $2
@@ -77,9 +77,9 @@
 $$ LANGUAGE SQL STABLE;
 
 CREATE AGGREGATE public.agg_tsvector (
-	sfunc	 = public.tsvector_concat,
-	basetype = tsvector,
-	stype	 = tsvector
+	sfunc	 = tsvector_concat,
+	basetype = pg_catalog.tsvector,
+	stype	 = pg_catalog.tsvector
 );
 
 CREATE OR REPLACE FUNCTION public.explode_array(anyarray) RETURNS SETOF anyelement AS $BODY$



More information about the open-ils-commits mailing list