Fix issues #1529 & #1530
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 21968a8..e73122b 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -617,8 +617,8 @@
if ($escape === TRUE)
{
$k = (($op = $this->_get_operator($k)) !== FALSE)
- ? $this->escape_identifiers(substr($k, 0, strpos($k, $op))).strstr($k, $op)
- : $this->escape_identifiers($k);
+ ? $this->escape_identifiers(trim(substr($k, 0, strpos($k, $op)))).' '.strstr($k, $op)
+ : $this->escape_identifiers(trim($k));
}
if (is_null($v) && ! $this->_has_operator($k))