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