xref: /PHP-7.1/ext/pgsql/tests/11pg_meta_data.phpt (revision 5fd6365c)
1--TEST--
2PostgreSQL pg_metadata()
3--SKIPIF--
4<?php include("skipif.inc"); ?>
5--FILE--
6<?php
7error_reporting(E_ALL);
8
9include 'config.inc';
10
11$db = pg_connect($conn_str);
12
13$meta = pg_meta_data($db, $table_name);
14
15var_dump($meta);
16?>
17--EXPECT--
18array(3) {
19  ["num"]=>
20  array(7) {
21    ["num"]=>
22    int(1)
23    ["type"]=>
24    string(4) "int4"
25    ["len"]=>
26    int(4)
27    ["not null"]=>
28    bool(false)
29    ["has default"]=>
30    bool(false)
31    ["array dims"]=>
32    int(0)
33    ["is enum"]=>
34    bool(false)
35  }
36  ["str"]=>
37  array(7) {
38    ["num"]=>
39    int(2)
40    ["type"]=>
41    string(4) "text"
42    ["len"]=>
43    int(-1)
44    ["not null"]=>
45    bool(false)
46    ["has default"]=>
47    bool(false)
48    ["array dims"]=>
49    int(0)
50    ["is enum"]=>
51    bool(false)
52  }
53  ["bin"]=>
54  array(7) {
55    ["num"]=>
56    int(3)
57    ["type"]=>
58    string(5) "bytea"
59    ["len"]=>
60    int(-1)
61    ["not null"]=>
62    bool(false)
63    ["has default"]=>
64    bool(false)
65    ["array dims"]=>
66    int(0)
67    ["is enum"]=>
68    bool(false)
69  }
70}
71