From: Dylan William Hardison Date: Mon, 29 Sep 2014 03:24:39 +0000 (-0400) Subject: Bug 1044457 - PostgreSQL 8.x fails with error: language "plpgsql" does not exist X-Git-Tag: bugzilla-4.5.6~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6fa99287f4aaa2e2f134ca8e0eebb39c2cc2b6a;p=thirdparty%2Fbugzilla.git Bug 1044457 - PostgreSQL 8.x fails with error: language "plpgsql" does not exist --- diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 9c5758432b..4ec95725de 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -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