_all => 'Connection to database failed, cannot continue testing';
}
my $superuser = is_super();
isnt ($dbh, undef, 'Connect to database for database handle method testing');
# silence notices about
" gives a warning when AutoCommit is on';
$dbh->{AutoCommit}=0;
eval {
$dbh->begin_work();
};
isnt ($@, q{}, $t);
$t='DB handle method "begin_work" gives no warning when AutoCommit is off';
$dbh-
$t='DB handle method "get_info" with no arguments gives an error';
eval {
$dbh->get_info();
};
isnt ($@, q{}, $t);
$t='DB handle method "get_info" with undef argument returns undef';
$result = $db
plan skip_all => 'Connection to database failed, cannot continue testing';
}
plan tests => 293;
isnt ($dbh, undef, 'Connect to database for handle attributes testing');
my $pgversion = $dbh->{pg_se
=q{};
eval {
local $SIG{__WARN__} = sub { $warning = shift; };
$dbh->{CrazyDiamond}=1;
};
isnt ($warning, q{}, $t);
$t='Setting a private attribute on a database handle does not throw an erro
=q{};
eval {
local $SIG{__WARN__} = sub { $warning = shift; };
$sth->{CrazyDiamond}=1;
};
isnt ($warning, q{}, $t);
$t='Setting a private attribute on a statement handle does not throw an err
plan skip_all => 'Connection to database failed, cannot continue testing';
}
plan tests => 152;
isnt ($dbh, undef, 'Connect to database for statement handle method testing');
my ($SQL, $sth, $sth2,
FROM dbd_pg_test WHERE id IN (33,34)');
$sth->execute();
eval {
$sth->fetchall_hashref();
};
isnt ($@, q{}, $t);
$t='Statement handle method "fetchall_hashref" works with a named key field';
$st
E id IN (33,34) ORDER BY id');
$sth->execute();
my $bindme2;
eval {
$sth->bind_columns(1);
};
isnt ($@, q{}, $t);
$t='Statement handle method "bind_columns" returns the correct value';
$result =
to database failed, cannot continue testing';
}
plan tests => 109;
my $superuser = is_super();
isnt ($dbh, undef, 'Connect to database for miscellaneous tests');
my $t = q{Method 'server_trace_fla
as the second arg';
my $port = $dbh->{pg_port};
@sources = DBI->data_sources('Pg',"port=$port");
isnt ($sources[0], undef, $t);
$t='The "data_sources" method works when DBI_DSN is not set';
{
lo
not continue testing';
}
plan tests => 261;
my $t='Connect to database for placeholder testing';
isnt ($dbh, undef, $t);
my $pgversion = $dbh->{pg_server_version};
if ($pgversion >= 80100) {
$dbh-
base failed, cannot continue testing';
}
my $t='Connect to database for pg_error_field testing';
isnt ($dbh, undef, $t);
$t = 'Call to pg_error_field gives a usage error if no specific field given';
plan skip_all => 'Connection to database failed, cannot continue testing';
}
plan tests => 3;
isnt ($dbh, undef, 'Connect to database for savepoint testing');
my $t;
my $str = 'Savepoint Test';
if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue testing';
}
isnt ($dbh, undef, 'Connect to database for unicode testing');
my @tests;
my $server_encoding = $db
plan skip_all => 'Connection to database failed, cannot continue testing';
}
plan tests => 206;
isnt ($dbh, undef, 'Connect to database for array testing');
my ($sth,$result,$t);
my $pgversion = $
plan skip_all => 'Connection to database failed, cannot continue testing';
}
plan tests => 67;
isnt ($dbh, undef, 'Connect to database for async testing');
my ($t,$sth,$res);
my $pgversion = $dbh-
plan skip_all => 'Connection to database failed, cannot continue testing';
}
plan tests => 36;
isnt ($dbh, undef, 'Connect to database for bytea testing');
my $pgversion = $dbh->{pg_server_version
{
if (! $dbh) {
skip ('Connection to database failed, cannot cleanup', 1);
}
isnt ($dbh, undef, 'Connect to database for cleanup');
cleanup_database($dbh);
}
$dbh->disconnec