summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/connection.inc
blob: e6e9c143af3b668e6fec6029efa860c3a42a55cc (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
<?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";
}

pg_close($db);

echo "OK";

?>