Implementing set encoding in DboPostgres

This commit is contained in:
José Lorenzo Rodríguez 2010-10-21 00:01:36 -04:30
parent ba1eb62678
commit 2262844346

View file

@ -773,7 +773,10 @@ class DboPostgres extends DboSource {
* @return boolean True on success, false on failure
*/
function setEncoding($enc) {
return pg_set_client_encoding($this->connection, $enc) == 0;
if ($this->_execute('SET NAMES ?', array($enc))) {
return true;
}
return false;
}
/**