xref: /php-src/ext/pgsql/tests/00version.phpt (revision c15988aa)
1--TEST--
2PostgreSQL version
3--EXTENSIONS--
4pgsql
5--SKIPIF--
6<?php include("inc/skipif.inc"); ?>
7--FILE--
8<?php
9// Get postgresql version for easier debugging.
10// Execute run-test.php with --keep-all to get version string in 00version.log or 00version.out
11include('inc/config.inc');
12
13$db = pg_connect($conn_str);
14var_dump(pg_version($db));
15pg_close($db);
16// Get environment vars for debugging
17var_dump(serialize($_ENV));
18
19echo "OK";
20?>
21--EXPECTF--
22array(13) {
23  ["client"]=>
24  string(%d) "%s"
25  ["protocol"]=>
26  int(%d)
27  ["server"]=>
28  string(%d) "%s"
29  ["server_encoding"]=>
30  string(%d) "%s"
31  ["client_encoding"]=>
32  string(%d) "%s"
33  ["is_superuser"]=>
34  string(%d) "%s"
35  ["session_authorization"]=>
36  string(%d) "%s"
37  ["DateStyle"]=>
38  string(%d) "%s"
39  ["IntervalStyle"]=>
40  string(%d) %s
41  ["TimeZone"]=>
42  string(%d) "%s"
43  ["integer_datetimes"]=>
44  string(%d) "%s"
45  ["standard_conforming_strings"]=>
46  string(%d) "%s"
47  ["application_name"]=>
48  string(%d) %s
49}
50string(%d) "%a"
51OK
52