aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/postgres.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r--phpBB/includes/db/postgres.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index d9e8bc2bfa..eb5f2d17e8 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -127,10 +127,6 @@ class dbal_postgres extends dbal
{
global $cache;
- if (strpos($query, 'SELECT') === 0 && strpos($query, 'FROM (') !== false)
- {
- $query = preg_replace('#FROM \(([^)]+)\)\s#', 'FROM \1 ', $query);
- }
// EXPLAIN only in extra debug mode
if (defined('DEBUG_EXTRA'))
@@ -145,7 +141,7 @@ class dbal_postgres extends dbal
{
$this->num_queries++;
- if (($this->query_result = @pg_exec($this->db_connect_id, $query)) === false)
+ if (($this->query_result = @pg_query($this->db_connect_id, $query)) === false)
{
$this->sql_error($query);
}
@@ -179,6 +175,15 @@ class dbal_postgres extends dbal
}
/**
+ * Build db-specific query data
+ * @private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+
+ /**
* Build LIMIT query
*/
function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)