Dotclear


Ignore:
Timestamp:
06/02/11 18:46:03 (14 years ago)
Author:
xave
Branch:
default
Message:

Now handles non default postgres schemas.

Enter schema name in the database prefix using a period as separator: 'schema.prefix'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.core.php

    r270 r331  
    6363          if ($this->con instanceof mysqlConnection) { 
    6464               mysqlConnection::$weak_locks = true; 
     65          } 
     66           
     67          # define searchpath for postgresql 
     68          if ($this->con instanceof pgsqlConnection) 
     69          { 
     70               $searchpath = explode ('.',$prefix,2); 
     71               if (count($searchpath) > 1) 
     72               { 
     73                    $prefix = $searchpath[1]; 
     74                    $sql = 'SET search_path TO '.$searchpath[0].',public;'; 
     75                    $this->con->execute($sql); 
     76               } 
    6577          } 
    6678           
Note: See TracChangeset for help on using the changeset viewer.

Sites map