--- library/Zend/Db/Adapter/Abstract.php	(revisione 9174)
+++ library/Zend/Db/Adapter/Abstract.php	(copia locale)
@@ -113,6 +113,20 @@
     protected $_autoQuoteIdentifiers = true;
 
     /**
+     * Specifies the schema separator for the DBMS handled by the adapter.
+     *
+     * This allow you to extend an Adapter for a DBMS which doesn't manage
+     * schemas and to use a custom qualifier to group table in namespaces
+     * (for example namespace1__table1 namespace2__table2 with '__' as
+     * schema separator)
+     * 
+     * @see Zend_Db_Adapter_Abstract::getSchemaSeparator()
+     * 
+     * @var string
+     */
+    protected $_schemaSeparator = '.';
+
+    /**
      * Keys are UPPERCASE SQL datatypes or the constants
      * Zend_Db::INT_TYPE, Zend_Db::BIGINT_TYPE, or Zend_Db::FLOAT_TYPE.
      *
@@ -260,6 +274,18 @@
     }
 
     /**
+     * Returns the string used to identify the schema qualifier.
+     * 
+     * @see Zend_Db_Adapter_Abstract::$_schemaSeparator
+     *
+     * @return string
+     */
+    public function getSchemaSeparator()
+    {
+        return $this->_schemaSeparator;
+    }
+    
+    /**
      * Returns the underlying database connection object or resource.
      * If not presently connected, this initiates the connection.
      *
Index: library/Zend/Db/Select.php
===================================================================
--- library/Zend/Db/Select.php	(revisione 9174)
+++ library/Zend/Db/Select.php	(copia locale)
@@ -898,7 +898,7 @@
         if ($schema === null) {
             return null;
         }
-        return $this->_adapter->quoteIdentifier($schema, true) . '.';
+        return $this->_adapter->quoteIdentifier($schema, true) . $this->_adapter->getSchemaSeparator();
     }
 
     /**
Index: library/Zend/Db/Table/Abstract.php
===================================================================
--- library/Zend/Db/Table/Abstract.php	(revisione 9174)
+++ library/Zend/Db/Table/Abstract.php	(copia locale)
@@ -565,8 +565,8 @@
     {
         if (! $this->_name) {
             $this->_name = get_class($this);
-        } else if (strpos($this->_name, '.')) {
-            list($this->_schema, $this->_name) = explode('.', $this->_name);
+        } else if (strpos($this->_name, $this->_db->getSchemaSeparator())) {
+            list($this->_schema, $this->_name) = explode($this->_db->getSchemaSeparator(), $this->_name);
         }
     }
 
@@ -593,7 +593,7 @@
         // If $this has a metadata cache
         if (null !== $this->_metadataCache) {
             // Define the cache identifier where the metadata are saved
-            $cacheId = md5("$this->_schema.$this->_name");
+            $cacheId = md5($this->_schema.$this->_db->getSchemaSeparator().$this->_name);
         }
 
         // If $this has no metadata cache or metadata cache misses
@@ -674,7 +674,7 @@
         if ($this->_sequence === true && $this->_db instanceof Zend_Db_Adapter_Pdo_Pgsql) {
             $this->_sequence = "{$this->_name}_{$pkIdentity}_seq";
             if ($this->_schema) {
-                $this->_sequence = $this->_schema . '.' . $this->_sequence;
+                $this->_sequence = $this->_schema . $this->_db->getSchemaSeparator() . $this->_sequence;
             }
         }
     }
@@ -811,7 +811,7 @@
         /**
          * INSERT the new row.
          */
-        $tableSpec = ($this->_schema ? $this->_schema . '.' : '') . $this->_name;
+        $tableSpec = ($this->_schema ? $this->_schema . $this->_db->getSchemaSeparator() : '') . $this->_name;
         $this->_db->insert($tableSpec, $data);
 
         /**
@@ -845,7 +845,7 @@
      */
     public function update(array $data, $where)
     {
-        $tableSpec = ($this->_schema ? $this->_schema . '.' : '') . $this->_name;
+        $tableSpec = ($this->_schema ? $this->_schema . $this->_db->getSchemaSeparator() : '') . $this->_name;
         return $this->_db->update($tableSpec, $data, $where);
     }
 
@@ -895,7 +895,7 @@
      */
     public function delete($where)
     {
-        $tableSpec = ($this->_schema ? $this->_schema . '.' : '') . $this->_name;
+        $tableSpec = ($this->_schema ? $this->_schema . $this->_db->getSchemaSeparator() : '') . $this->_name;
         return $this->_db->delete($tableSpec, $where);
     }
 

