summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-03 02:48:12 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-03 02:48:12 +0100
commit8e89df8f92444eb02dc73b6c3e66077a4fb3f710 (patch)
tree9336b4d9d564a1219285c53f942d1fde3e79a277 /system/database/drivers/postgre
parent08856b8738ea4fc17b13986c9f2619383cb4a6e9 (diff)
Add db_set_charset() support for PostgreSQL and change its implementation for 'mysql'
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index d6681086a..8df90f6a4 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -147,6 +147,19 @@ class CI_DB_postgre_driver extends CI_DB {
// --------------------------------------------------------------------
/**
+ * Set client character set
+ *
+ * @param string
+ * @return bool
+ */
+ protected function _db_set_charset($charset)
+ {
+ return (pg_set_client_encoding($this->conn_id, $charset) === 0);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Database version number
*
* @return string