summaryrefslogtreecommitdiff
path: root/includes/database/pgsql/database.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/database/pgsql/database.inc')
-rw-r--r--includes/database/pgsql/database.inc13
1 files changed, 2 insertions, 11 deletions
diff --git a/includes/database/pgsql/database.inc b/includes/database/pgsql/database.inc
index ec68c3a39..6772471b6 100644
--- a/includes/database/pgsql/database.inc
+++ b/includes/database/pgsql/database.inc
@@ -99,11 +99,11 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
}
}
- public function queryRange($query, array $args, $from, $count, array $options = array()) {
+ public function queryRange($query, $from, $count, array $args = array(), array $options = array()) {
return $this->query($query . ' LIMIT ' . $count . ' OFFSET ' . $from, $args, $options);
}
- public function queryTemporary($query, array $args, array $options = array()) {
+ public function queryTemporary($query, array $args = array(), array $options = array()) {
$tablename = $this->generateTemporaryTableName();
$this->query(preg_replace('/^SELECT/i', 'CREATE TEMPORARY TABLE {' . $tablename . '} AS SELECT', $query), $args, $options);
return $tablename;
@@ -126,15 +126,6 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
return isset($specials[$operator]) ? $specials[$operator] : NULL;
}
-
- /**
- * @todo Remove this as soon as db_rewrite_sql() has been exterminated.
- */
- public function distinctField($table, $field, $query) {
- $field_to_select = 'DISTINCT(' . $table . '.' . $field . ')';
- // (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
- return preg_replace('/(SELECT.*)(?:' . $table . '\.|\s)(?<!DISTINCT\()(?<!DISTINCT\(' . $table . '\.)' . $field . '(.*FROM )/AUsi', '\1 ' . $field_to_select . '\2', $query);
- }
}
/**