Skip to content

Commit

Permalink
Merge branch 'w31_MDL-27685_m20_pglike' of git://github.com/skodak/mo…
Browse files Browse the repository at this point in the history
…odle into MOODLE_20_STABLE
  • Loading branch information
Sam Hemelryk committed Aug 8, 2011
2 parents 11909e8 + e4ff5b5 commit 6aec498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dml/pgsql_native_moodle_database.php
Expand Up @@ -277,12 +277,12 @@ public function get_tables($usecache=true) {
return $this->tables; return $this->tables;
} }
$this->tables = array(); $this->tables = array();
$prefix = str_replace('_', '\\\\_', $this->prefix); $prefix = str_replace('_', '|_', $this->prefix);
// Get them from information_schema instead of catalog as far as // Get them from information_schema instead of catalog as far as
// we want to get only own session temp objects (catalog returns all) // we want to get only own session temp objects (catalog returns all)
$sql = "SELECT table_name $sql = "SELECT table_name
FROM information_schema.tables FROM information_schema.tables
WHERE table_name LIKE '$prefix%' WHERE table_name LIKE '$prefix%' ESCAPE '|'
AND table_type IN ('BASE TABLE', 'LOCAL TEMPORARY')"; AND table_type IN ('BASE TABLE', 'LOCAL TEMPORARY')";
$this->query_start($sql, null, SQL_QUERY_AUX); $this->query_start($sql, null, SQL_QUERY_AUX);
$result = pg_query($this->pgsql, $sql); $result = pg_query($this->pgsql, $sql);
Expand Down

0 comments on commit 6aec498

Please sign in to comment.