Subject: | pg_getcopydata test in 07copy.t invalid for pgsql versions prior to 8.2 |
DBD::Pg-2.6.2
Perl v5.8.8
Postgresql v8.1.9
O.S. GNU/Linux Fedora 7
The following test in the 07copy.t test file (begins on line 305) fails
on systems with a Postgresql version earlier than 8.2, because the 'COPY
(query) TO' syntax isn't valid in pgsql prior to 8.2.
$t=q{pg_getcopydata works when pulling from an empty table into an empty
var};
$dbh->do('COPY (SELECT 1 FROM pg_class LIMIT 0) TO STDOUT');
eval {
my $newvar;
$dbh->pg_getcopydata($newvar);
};
is($@, q{}, $t);
I'm sorry I don't have a fix, but I just don't understand what the test
is doing well enough to figure out a work around.