[Pkg-dspam-commits] [SCM] Debian packages for the DSPAM anti-spam filter branch, master, updated. debian/3.10.2+dfsg-3-21-g21f312e

Thomas Preud'homme robotux at celest.fr
Sat Apr 6 11:28:05 UTC 2013


The following commit has been merged in the master branch:
commit 75a4e689ee5d5c233ab60b0fd3330fb23968134a
Author: Thomas Preud'homme <robotux at celest.fr>
Date:   Thu Mar 7 10:33:10 2013 +0100

    Create plpgsql only if it is not loaded yet

diff --git a/debian/changelog b/debian/changelog
index bb20992..41436be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dspam (3.10.1+dfsg-11) testing-proposed-updates; urgency=low
+
+  * Create plpgsql only if it is not loaded yet.
+
+ -- Thomas Preud'homme <robotux at debian.org>  Thu, 07 Mar 2013 10:25:49 +0100
+
 dspam (3.10.1+dfsg-10) testing-proposed-updates; urgency=low
 
   * Explicitly require legacy mode for string escaping in PostgreSQL since it
diff --git a/debian/sqlfiles/install-dbadmin/pgsql b/debian/sqlfiles/install-dbadmin/pgsql
index 144ea8e..07e050d 100644
--- a/debian/sqlfiles/install-dbadmin/pgsql
+++ b/debian/sqlfiles/install-dbadmin/pgsql
@@ -1 +1,19 @@
-CREATE EXTENSION IF NOT EXISTS plpgsql;
+CREATE OR REPLACE FUNCTION public.create_plpgsql_language ()
+        RETURNS TEXT
+        AS $$
+            CREATE LANGUAGE plpgsql;
+            SELECT 'language plpgsql created'::TEXT;
+        $$
+LANGUAGE 'sql';
+
+SELECT CASE WHEN
+              (SELECT true::BOOLEAN
+                 FROM pg_language
+                WHERE lanname='plpgsql')
+            THEN
+              (SELECT 'language already installed'::TEXT)
+            ELSE
+              (SELECT public.create_plpgsql_language())
+            END;
+
+DROP FUNCTION public.create_plpgsql_language ();

-- 
Debian packages for the DSPAM anti-spam filter



More information about the Pkg-dspam-commits mailing list