Created
May 11, 2017 12:25
-
-
Save lcube45/7c0d7a4fe0abb0d9228b4bb8a0d86cd1 to your computer and use it in GitHub Desktop.
Drush with PostGreSql on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drush\Sql; | |
define('PSQL_SHOW_TABLES', "SELECT tablename FROM pg_tables WHERE schemaname='public';"); | |
class Sqlpgsql extends SqlBase { | |
//public $query_extra = "--no-align --field-separator=\"\t\" --pset tuples_only=on"; | |
public $query_extra = "--no-align --pset tuples_only=on"; | |
... | |
public function command() { | |
$environment = ""; | |
$pw_file = $this->password_file(); | |
if (isset($pw_file)) { | |
//$environment = "PGPASSFILE={$pw_file} "; | |
$environment = "SET PGPASSFILE={$pw_file} & "; | |
} | |
return "{$environment}psql -q"; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
taking from a pull request drush-ops/drush@7f5c13f