Author: turnstep
Date: Tue Apr 6 11:28:20 2010
New Revision: 13889
Modified:
DBD-Pg/trunk/t/03dbmethod.t
DBD-Pg/trunk/t/dbdpg_test_setup.pl
Log:
More testing fixes to support all versions of Postgres
Modified: DBD-Pg/trunk/t/03dbmethod.t
==============================================================================
--- DBD-Pg/trunk/t/03dbmethod.t (original)
+++ DBD-Pg/trunk/t/03dbmethod.t Tue Apr 6 11:28:20 2010
@@ -1427,7 +1427,7 @@
if ($pglibversion < 80400) {
skip ('Cannot test pg_lo_import_with_oid unless
compiled against 8.4 or better server', 5);
}
- if ($pgversion < 80000) {
+ if ($pgversion < 80100) {
skip ('Cannot test pg_lo_import_with_oid against old
versions of Postgres', 5);
}
Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl Tue Apr 6 11:28:20 2010
@@ -132,7 +132,7 @@
}
}
$option = q{-o '-k socket'};
- if ($version < 8.0) {
+ if ($version <= 8.0) {
$option = q{-o '-k
dbdpg_test_database/data/socket'};
}
}
@@ -270,9 +270,12 @@
}
last GETHANDLE; ## Fail - initdb bad
}
- elsif ($info =~ /(\d+\.\d+)\.\d+/) {
+ elsif ($info =~ /(\d+\.\d+)/) {
$version = $1;
}
+ else {
+ die "No version from initdb?! ($info)\n";
+ }
## Make sure pg_ctl is available as well before we go further
if (! -e $pg_ctl) {
@@ -416,6 +419,13 @@
else {
print $cfh "silent_mode = true\n";
}
+ if ($version == 8.1) {
+ print {$cfh} "redirect_stderr = on\n";
+ }
+
+ if ($version >= 8.3) {
+ print {$cfh} "logging_collector = on\n";
+ }
print $cfh "log_min_messages = 'DEBUG1'\n";
print $cfh "listen_addresses='127.0.0.1'\n" if $^O =~ /Win32/;
print $cfh "\n";
@@ -439,7 +449,7 @@
}
}
$option = q{-o '-k socket'};
- if ($version < 8.0) {
+ if ($version <= 8.0) {
$option = q{-o '-k
dbdpg_test_database/data/socket'};
}
}