Skip to content
Permalink
Browse files

Implementing set encoding in DboPostgres

  • Loading branch information...
lorenzo committed Oct 21, 2010
1 parent ba1eb62 commit 226284434666cb5452b000a6e6c514eaad7f7adc
Showing with 4 additions and 1 deletion.
  1. +4 −1 cake/libs/model/datasources/dbo/dbo_postgres.php
@@ -773,7 +773,10 @@ function boolean($data, $quote = true) {
* @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;
}
/**

0 comments on commit 2262844

Please sign in to comment.
You can’t perform that action at this time.