some tweaks to tsvector and friends to get the db schema to build cleanly
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 16 Apr 2011 05:40:26 +0000 (05:40 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 16 Apr 2011 05:40:26 +0000 (05:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@20126 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.functions.aggregate.sql

index fb0c311..bf4fcfa 100644 (file)
@@ -21,7 +21,7 @@ DROP AGGREGATE IF EXISTS array_accum(anyelement) CASCADE;
 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 @@ CREATE AGGREGATE public.agg_text (
        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 @@ SELECT
 $$ 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$