diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-10-16 11:10:54 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-10-16 11:10:54 +0200 |
commit | 1b7e8f9cfffcd8344620a1013c20fee8355028a1 (patch) | |
tree | f453f715917b092d5b3fd5bd6ec0013ea1f78700 /Bugzilla/DB | |
parent | 6421ccd7f8c3a57b953fa23fbe87e900f8ae2359 (diff) | |
download | bugzilla-1b7e8f9cfffcd8344620a1013c20fee8355028a1.tar.gz bugzilla-1b7e8f9cfffcd8344620a1013c20fee8355028a1.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.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index b6be64011..4f818932b 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -215,11 +215,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(@_); } } |