public function copyDatabase($source, $target) {
		$this->dropDatabase($target);
		$this->createDatabase($target, null);

		$src = escapeshellarg($source);
		$tgt = escapeshellarg($tgt);

		// Use pg_dump to create the copy
		$cmd = String("pg_dump {0} | psql {1}")->format($src, $tgt);
		$failure = false;
		passthru($cmd, $failure);
		if ($failure) {
			throw new RuntimeException("Unable to copy database $source to $target");
		}
	}