Added and documented Active Record caching.
Made AR fully database-prefix aware
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index e729813..ae8bd86 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -444,6 +444,13 @@
 		// we may need ""item1" "item2"" and not ""item1 item2""

 		if (ctype_alnum($item) === FALSE)

 		{

+			if (strpos($item, '.') !== FALSE)

+			{

+				$aliased_tables = implode(".",$this->ar_aliased_tables).'.';

+				$table_name =  substr($item, 0, strpos($item, '.')+1);

+				$item = (strpos($aliased_tables, $table_name) !== FALSE) ? $item = $item : $this->dbprefix.$item;

+			}

+

 			// This function may get "field >= 1", and need it to return ""field" >= 1"

 			$lbound = ($first_word_only === TRUE) ? '' : '|\s|\(';

 

@@ -486,7 +493,7 @@
 			$tables = array($tables);

 		}

 		

-		return implode(', ', $tables);

+		return '('.implode(', ', $tables).')';

 	}

 

 	// --------------------------------------------------------------------