[open-ils-commits] r14459 - trunk/Open-ILS/src/sql/Pg (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Oct 15 18:19:02 EDT 2009


Author: dbs
Date: 2009-10-15 18:18:56 -0400 (Thu, 15 Oct 2009)
New Revision: 14459

Added:
   trunk/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql
Log:
Simplest possible way to add PostgreSQL 8.4 support.

Ubuntu 9.10 (Karmic Koala) ships with PostgreSQL 8.4, and in my
testing it works identically to 8.3. Let's add it and avoid at
least one install-time pain.


Copied: trunk/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql (from rev 14404, trunk/Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql)
===================================================================
--- trunk/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql	2009-10-15 22:18:56 UTC (rev 14459)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2004-2008  Georgia Public Library Service
+ * Copyright (C) 2008  Equinox Software, Inc., Laurentian University
+ * Mike Rylander <miker at esilibrary.com>
+ * Dan Scott <dscott at laurentian.ca>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+BEGIN;
+
+CREATE OR REPLACE FUNCTION oils_tsearch2 () RETURNS TRIGGER AS $$
+BEGIN
+	NEW.index_vector = to_tsvector((TG_ARGV[0])::regconfig, NEW.value);
+	RETURN NEW;
+END;
+$$ LANGUAGE PLPGSQL;
+
+DROP TEXT SEARCH DICTIONARY IF EXISTS english_nostop CASCADE;
+
+CREATE TEXT SEARCH DICTIONARY english_nostop (TEMPLATE=pg_catalog.snowball, language='english');
+COMMENT ON TEXT SEARCH DICTIONARY english_nostop IS 'English snowball stemmer with no stopwords for ASCII words only.';
+
+CREATE TEXT SEARCH CONFIGURATION title ( COPY = pg_catalog.english );
+ALTER TEXT SEARCH CONFIGURATION title ALTER MAPPING FOR word, hword, hword_part WITH pg_catalog.simple;
+ALTER TEXT SEARCH CONFIGURATION title ALTER MAPPING FOR asciiword, asciihword, hword_asciipart WITH public.english_nostop;
+CREATE TEXT SEARCH CONFIGURATION author ( COPY = title );
+CREATE TEXT SEARCH CONFIGURATION subject ( COPY = title );
+CREATE TEXT SEARCH CONFIGURATION keyword ( COPY = title );
+CREATE TEXT SEARCH CONFIGURATION series ( COPY = title );
+CREATE TEXT SEARCH CONFIGURATION "default" ( COPY = title );
+
+COMMIT;


Property changes on: trunk/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql
___________________________________________________________________
Name: svn:mergeinfo
   + /trunk/Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql:10932,10935



More information about the open-ils-commits mailing list