Commit b60afed2 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 799721: PostgreSQL 9.2 requires DBD::Pg 2.19.3

r=glob a=LpSolit
parent ddb10035
...@@ -196,11 +196,12 @@ sub bz_check_server_version { ...@@ -196,11 +196,12 @@ sub bz_check_server_version {
my $self = shift; my $self = shift;
my ($db) = @_; my ($db) = @_;
my $server_version = $self->SUPER::bz_check_server_version(@_); my $server_version = $self->SUPER::bz_check_server_version(@_);
my ($major_version) = $server_version =~ /^(\d+)/; my ($major_version, $minor_version) = $server_version =~ /^0*(\d+)\.0*(\d+)/;
# Pg 9 requires DBD::Pg 2.17.2 in order to properly read bytea values. # 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) { if ($major_version >= 9) {
local $db->{dbd}->{version} = '2.17.2'; local $db->{dbd}->{version} = ($minor_version >= 2) ? '2.19.3' : '2.17.2';
local $db->{name} = $db->{name} . ' 9+'; local $db->{name} = $db->{name} . " ${major_version}.$minor_version";
Bugzilla::DB::_bz_check_dbd(@_); Bugzilla::DB::_bz_check_dbd(@_);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment