summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-10-16 11:08:12 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-10-16 11:08:12 +0200
commitb60afed2cc7c8776217444049e5ebfadf5839a24 (patch)
treeed3a47b32d5add8e16ffa3177503c6e98b1485e1 /Bugzilla/DB
parentddb100352de89b6155a864838e7fa1a26bbbf93c (diff)
downloadbugzilla-b60afed2cc7c8776217444049e5ebfadf5839a24.tar.gz
bugzilla-b60afed2cc7c8776217444049e5ebfadf5839a24.tar.xz
Bug 799721: PostgreSQL 9.2 requires DBD::Pg 2.19.3
r=glob a=LpSolit
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Pg.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index 80bfb4f5f..df775fe16 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -196,11 +196,12 @@ sub bz_check_server_version {
my $self = shift;
my ($db) = @_;
my $server_version = $self->SUPER::bz_check_server_version(@_);
- my ($major_version) = $server_version =~ /^(\d+)/;
- # Pg 9 requires DBD::Pg 2.17.2 in order to properly read bytea values.
+ my ($major_version, $minor_version) = $server_version =~ /^0*(\d+)\.0*(\d+)/;
+ # Pg 9.0 requires DBD::Pg 2.17.2 in order to properly read bytea values.
+ # Pg 9.2 requires DBD::Pg 2.19.3 as spclocation no longer exists.
if ($major_version >= 9) {
- local $db->{dbd}->{version} = '2.17.2';
- local $db->{name} = $db->{name} . ' 9+';
+ local $db->{dbd}->{version} = ($minor_version >= 2) ? '2.19.3' : '2.17.2';
+ local $db->{name} = $db->{name} . " ${major_version}.$minor_version";
Bugzilla::DB::_bz_check_dbd(@_);
}
}