src/WorkerF/DB/Drivers/Pgsql.php
protected function _connect()
    {
        extract($this->_config, EXTR_SKIP);

        $dsn = 'pgsql:dbname='.$dbname.
               (isset($host) ? ';host='.$host : '').
               (isset($port) ? ';port='.$port : '').
               (isset($sslmode) ? ';sslmode='.$sslmode : '');

        $options = isset($options) ? $options + $this->_options : $this->_options;

        try {

            $this->_pdo = new PDO($dsn, $user, $password, $options);

            // charset set
            if (isset($charset)) {
                $this->_pdo->prepare("set names '$charset'")->execute();
            }
            // timezone
            if (isset($timezone)) {
                $this->_pdo->prepare("set time zone '$timezone'")->execute();
            }
            // set schema path
            if (isset($schema)) {
                $this->_pdo->prepare("set search_path to $schema")->execute();
            }
            // set application name
            if (isset($application_name)) {
                $this->_pdo->prepare("set application_name to '$applicationName'")->execute();
            }
        } catch (PDOException $e) {
            throw $e;
        }
    }
protected function _connect()
    {
        extract($this->_config, EXTR_SKIP);

        $dsn = 'pgsql:dbname='.$dbname.
               (isset($host) ? ';host='.$host : '').
               (isset($port) ? ';port='.$port : '').
               (isset($sslmode) ? ';sslmode='.$sslmode : '');

        $options = isset($options) ? $options + $this->_options : $this->_options;

        try {

            $this->_pdo = new PDO($dsn, $user, $password, $options);

            // charset set
            if (isset($charset)) {
                $this->_pdo->prepare("set names '$charset'")->execute();
            }
            // timezone
            if (isset($timezone)) {
                $this->_pdo->prepare("set time zone '$timezone'")->execute();
            }
            // set schema path
            if (isset($schema)) {
                $this->_pdo->prepare("set search_path to $schema")->execute();
            }
            // set application name
            if (isset($application_name)) {
                $this->_pdo->prepare("set application_name to '$applicationName'")->execute();
            }
        } catch (PDOException $e) {
            throw $e;
        }
    }
create a PDO instance

@return  void
@throws  \PDOException