Merge branch 'w31_MDL-27685_m21_pglike' of git://github.com/skodak/moodle into MOODLE_21_STABLE

This commit is contained in:
Sam Hemelryk
2011-08-08 10:25:47 +08:00
+2 -2
View File
@@ -277,12 +277,12 @@ class pgsql_native_moodle_database extends moodle_database {
return $this->tables;
}
$this->tables = array();
$prefix = str_replace('_', '\\\\_', $this->prefix);
$prefix = str_replace('_', '|_', $this->prefix);
// Get them from information_schema instead of catalog as far as
// we want to get only own session temp objects (catalog returns all)
$sql = "SELECT table_name
FROM information_schema.tables
WHERE table_name LIKE '$prefix%'
WHERE table_name LIKE '$prefix%' ESCAPE '|'
AND table_type IN ('BASE TABLE', 'LOCAL TEMPORARY')";
$this->query_start($sql, null, SQL_QUERY_AUX);
$result = pg_query($this->pgsql, $sql);