]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1044457 - PostgreSQL 8.x fails with error: language "plpgsql" does not exist
authorDylan William Hardison <dylan@hardison.net>
Mon, 29 Sep 2014 03:24:39 +0000 (23:24 -0400)
committerDylan William Hardison <dylan@hardison.net>
Mon, 29 Sep 2014 03:24:39 +0000 (23:24 -0400)
Bugzilla/DB/Pg.pm

index 9c5758432b6593831698e210d02d6ba779246e20..4ec95725de80bb4c7dc56eb0a8208cb1282c5793 100644 (file)
@@ -231,6 +231,9 @@ sub bz_setup_database {
     my $self = shift;
     $self->SUPER::bz_setup_database(@_);
 
+    my ($has_plpgsql) = $self->selectrow_array("SELECT COUNT(*) FROM pg_language WHERE lanname = 'plpgsql'");
+    $self->do('CREATE LANGUAGE plpgsql') unless $has_plpgsql;
+
     # Custom Functions
 
     # -Copyright © 2013 Joshua D. Burns (JDBurnZ) and Message In Action LLC