Bug#781722: libdbd-pg-perl: Interoperability problem "wheezy client" vs. "jessie server"
Christoph Biedl
debian.axhn at manchmal.in-ulm.de
Thu Apr 2 06:28:33 UTC 2015
Package: libdbd-pg-perl
Version: 2.19.2-2
Severity: important
Tags: patch
Dear Maintainer,
while doing tests in mixed wheezy/jessie environments (or, with the
same effect, using a private wheezy backport of PostgreSQL 9.4), I
noticed breakage in the "table_info" and "tables" methods in DBD::Pg.
Using these methods from a wheezy client (libdbd-pg-perl 2.19.2-2)
against a jessie server (postgresql-9.4 9.4.1-1) result in a
| DBD::Pg::db table_info failed: ERROR: column t.spclocation does not exist
error message, and application abort.
This was fixed in upstream commit
| commit 00f3d68a79beb31a06460dd8f7cb73168c33ca5c
| Author: Greg Sabino Mullane <greg at endpoint.com>
| Date: Thu May 31 14:10:19 2012 -0400
|
| Adjustments for the loss of spclocation in 9.2
|
| Pg.pm | 7 +++++++
| 1 file changed, 7 insertions(+)
and resolves the issue for me.
Therefore I'd like to suggest to add this to the wheezy version of
libdbd-pg-perl, and in due course, i.e. in the next point release the
latest. Such mixed installations are more likely to occur after the
jessie release, and no one wants to see such breakage.
The test below, stripped down from a production code, uses these
calls for a high-level check for existence of a certain table. It
passes on wheezy and jessie, but fails in the mixed scenario as
described above. Run as the "postgres" user, or grant proper access
privileges.
=================================================================
#!/usr/bin/perl
=cut
Run beforehand:
su postgres -c psql <<__EOS__
CREATE DATABASE testdb;
\c testdb
CREATE SCHEMA testschema;
CREATE TABLE testschema.test (id integer NOT NULL);
__EOS__
=cut
use 5.010;
use strict;
use warnings;
use DBI;
use Data::Dumper;
use Test::More;
my $dbh = DBI->connect ('dbi:Pg:dbname=testdb', '', '') or die;
my $sth = $dbh->table_info ('%', 'testschema', 'test') or die;
my $info = $sth->fetchall_arrayref;
diag (Dumper ($info));
ok (scalar @$info, 'non-empty table_info result');
my @got = grep { $_ eq 'testschema.test' } $dbh->tables ('%', 'testschema', 'test');
diag (Dumper (\@got));
is (scalar @got, 1, 'got via tables');
done_testing;
=================================================================
Regards,
Christoph
-- System Information:
Debian Release: 7.8
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.14.37 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages libdbd-pg-perl depends on:
ii libc6 2.13-38+deb7u8
ii libdbi-perl [perl-dbdabi-94] 1.622-1+deb7u1
ii libpq5 9.1.15-0+deb7u1
ii perl 5.14.2-21+deb7u2
ii perl-base [perlapi-5.14.2] 5.14.2-21+deb7u2
libdbd-pg-perl recommends no packages.
libdbd-pg-perl suggests no packages.
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20150402/b5cbf4ff/attachment.sig>
More information about the pkg-perl-maintainers
mailing list