2002-04-08 01:37:38 +00:00
|
|
|
--TEST--
|
|
|
|
PostgreSQL pg_metadata()
|
|
|
|
--SKIPIF--
|
|
|
|
<?php include("skipif.inc"); ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2003-05-20 00:14:46 +00:00
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
include 'config.inc';
|
|
|
|
|
|
|
|
$db = pg_connect($conn_str);
|
|
|
|
|
|
|
|
$meta = pg_meta_data($db, $table_name);
|
|
|
|
|
|
|
|
var_dump($meta);
|
2002-04-08 01:37:38 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
array(3) {
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"num"]=>
|
2003-08-28 00:29:44 +00:00
|
|
|
array(6) {
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"num"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
int(1)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"type"]=>
|
|
|
|
unicode(4) "int4"
|
|
|
|
[u"len"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
int(4)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"not null"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
bool(false)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"has default"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
bool(false)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"array dims"]=>
|
2003-08-28 00:29:44 +00:00
|
|
|
int(0)
|
2002-04-08 01:37:38 +00:00
|
|
|
}
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"str"]=>
|
2003-08-28 00:29:44 +00:00
|
|
|
array(6) {
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"num"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
int(2)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"type"]=>
|
|
|
|
unicode(4) "text"
|
|
|
|
[u"len"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
int(-1)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"not null"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
bool(false)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"has default"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
bool(false)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"array dims"]=>
|
2003-08-28 00:29:44 +00:00
|
|
|
int(0)
|
2002-04-08 01:37:38 +00:00
|
|
|
}
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"bin"]=>
|
2003-08-28 00:29:44 +00:00
|
|
|
array(6) {
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"num"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
int(3)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"type"]=>
|
|
|
|
unicode(5) "bytea"
|
|
|
|
[u"len"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
int(-1)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"not null"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
bool(false)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"has default"]=>
|
2002-04-08 01:37:38 +00:00
|
|
|
bool(false)
|
2009-12-30 17:22:42 +00:00
|
|
|
[u"array dims"]=>
|
2003-08-28 00:29:44 +00:00
|
|
|
int(0)
|
2002-04-08 01:37:38 +00:00
|
|
|
}
|
|
|
|
}
|