mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Implementing set encoding in DboPostgres
This commit is contained in:
parent
ba1eb62678
commit
2262844346
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue