summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/informational.inc
blob: 120c61335b580e4e02cce62c355c67ba9081e3b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
// connection function tests

include('config.inc');

$db = pg_pconnect($conn_str);
if (pg_connection_status($db) != PGSQL_CONNECTION_OK) 
{
	echo "pg_connection_status() error\n";
}
if (!pg_connection_reset($db)) 
{
	echo "pg_connection_reset() error\n";
}
if (pg_connection_busy($db)) 
{
	echo "pg_connection_busy() error\n";
}
if (!pg_host($db)) 
{
	echo "pg_host() error\n";
}
if (!pg_dbname($db)) 
{
	echo "pg_dbname() error\n";
}
if (!pg_port($db)) 
{
	echo "pg_port() error\n";
}
if (pg_tty($db)) 
{
	echo "pg_tty() error\n";
}
if (pg_options($db)) 
{
	echo "pg_options() error\n";
}

echo pg_host($db);


pg_close($db);

echo "OK";

?>