php-src/ext/pgsql/tests/skipif.inc

18 lines
434 B
PHP
Raw Normal View History

2001-12-17 00:16:48 +00:00
<?php
// This script prints "skip" unless:
// * the pgsql extension is built-in or loadable, AND
// * there is a database called "test" accessible
// with no username/password, AND
// * we have create/drop privileges on the entire "test"
// database
2001-12-17 02:09:07 +00:00
include("config.inc");
if (!extension_loaded("pgsql")) {
die("skip\n");
}
2001-12-17 02:09:07 +00:00
$conn = @pg_connect($conn_str);
2001-12-17 00:16:48 +00:00
if (!is_resource($conn)) {
2003-07-22 23:01:24 +00:00
die("skip could not connect\n");
2001-12-17 00:16:48 +00:00
}
?>