Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #18488 tableInfo doesn't return flags
Submitted: 2011-04-29 15:36 UTC
From: kurtjos Assigned:
Status: Open Package: MDB2_Driver_pgsql (version 1.5.0b3)
PHP Version: 5.3.1 OS: linux mint 10
Roadmaps: (Not assigned)    
Subscription  


 [2011-04-29 15:36 UTC] kurtjos (Kurt J Nilsen)
Description: ------------ my phpinfo says: PHP Version 5.3.3-1ubuntu9.3 postgresql version: 8.4.8 the table in question partial output from phppgsql: Column Type Not Null Default Constraints companyid integer NOT NULL [pk] it has a default value of: nextval(('"company_companyid_seq"'::text)::regclass) Test script: --------------- function loadFields($table_name){ global $mdb2; $tableinfo = array(); $q = "SELECT * FROM ".$table_name." LIMIT 1"; $res = $mdb2->query($q); $row = $res->fetchRow(); $cols = $res->getColumnNames(FLIP); $mdb2->loadModule('Extended'); $mdb2->loadModule('Manager'); $tableinfo = $mdb2->tableInfo($res,NULL); print_r("tableInfo: \n"); // my debug info print_r($tableinfo); // my debug info return $cols; } Expected result: ---------------- tableInfo: Array ( [0] => Array ( [table] => company [name] => companyid [type] => int4 [length] => 4 [flags] => not_null primary_key [mdb2type] => integer ) Actual result: -------------- tableInfo: Array ( [0] => Array ( [table] => company [name] => companyid [type] => int4 [length] => 4 [flags] => [mdb2type] => integer )

Comments