pg_meta_data Get meta data for table Description arraypg_meta_data resourceconnection stringtable_name pg_meta_data returns table definition for table_name as an array. If there is error, it returns &false; Getting table metadata '; var_dump($meta); echo ''; } ?> ]]> The above example would produce the following output: array(5) { ["num"]=> int(1) ["type"]=> string(7) "varchar" ["len"]=> int(-1) ["not null"]=> bool(false) ["has default"]=> bool(false) } ["year"]=> array(5) { ["num"]=> int(2) ["type"]=> string(4) "int2" ["len"]=> int(2) ["not null"]=> bool(false) ["has default"]=> bool(false) } ["title"]=> array(5) { ["num"]=> int(3) ["type"]=> string(7) "varchar" ["len"]=> int(-1) ["not null"]=> bool(false) ["has default"]=> bool(false) } } ]]> &warn.experimental.func; See also pg_convert.