public function Sqlpgsql::listTables

8.0.x Sqlpgsql.php public Sqlpgsql::listTables()
7.x Sqlpgsql.php public Sqlpgsql::listTables()
master Sqlpgsql.php public Sqlpgsql::listTables()

Extract the name of all existing tables in the given database.

Return value

array An array of table names which exist in the current database.

Overrides SqlBase::listTables

File

lib/Drush/Sql/Sqlpgsql.php, line 85

Namespace

Drush\Sql

Class

Sqlpgsql

Code

public function listTables() {
  $return = $this->query(PSQL_SHOW_TABLES);
  $tables = drush_shell_exec_output();
  if (!empty($tables)) {
    // Shift off the header of the column of data returned.
    array_shift($tables);
    return $tables;
  }
  return array();
}