Make DROP statement match new basetype for agg_tsvector
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 16 Mar 2011 03:38:26 +0000 (03:38 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 16 Mar 2011 03:38:26 +0000 (03:38 +0000)
When the CREATE AGGREGATE function was changed to have a basetype
of pg_catalog.agg_tsvector, the corresponding DROP statement was
not changed in a similar fashion; ergo, on creating the schema
a subsequent time, the CREATE statement would fail because the
aggregate function already existed and the transaction would be
rolled back.

Also - do we need to differentiate between PostgreSQL 8.4 and 9.0
here?

git-svn-id: svn://svn.open-ils.org/ILS/trunk@19758 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 26d908f..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,