diff options
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r-- | phpBB/includes/db/postgres.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index 72590d6330..f371202578 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -120,6 +120,11 @@ class dbal_postgres extends dbal { global $cache; + if (strpos($query, 'SELECT') === 0 && strpos($query, 'FROM (') !== false) + { + $query = preg_replace('#FROM \((.+)\) #', 'FROM \1 ', $query); + } + // EXPLAIN only in extra debug mode if (defined('DEBUG_EXTRA')) { |