+
+ $oCmd = new \Nominatim\Shell('psql');
+ $oCmd->addParams('--port', $aDSNInfo['port']);
+ $oCmd->addParams('--dbname', $aDSNInfo['database']);
+ if (isset($aDSNInfo['hostspec']) && $aDSNInfo['hostspec']) {
+ $oCmd->addParams('--host', $aDSNInfo['hostspec']);
+ }
+ if (isset($aDSNInfo['username']) && $aDSNInfo['username']) {
+ $oCmd->addParams('--username', $aDSNInfo['username']);
+ }
+ if (isset($aDSNInfo['password'])) {
+ $oCmd->addEnvPair('PGPASSWORD', $aDSNInfo['password']);
+ }