prepare('SELECT * FROM pg_catalog.pg_tables'); if($stm->execute()) while($row = $stm->fetch()) { var_dump($row); }