update to D 7.17

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-12-08 11:35:42 +01:00
parent 975d758599
commit 5396b3e2b5
284 changed files with 3674 additions and 1854 deletions

View File

@@ -74,6 +74,17 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
}
}
public function prepareQuery($query) {
// mapConditionOperator converts LIKE operations to ILIKE for consistency
// with MySQL. However, Postgres does not support ILIKE on bytea (blobs)
// fields.
// To make the ILIKE operator work, we type-cast bytea fields into text.
// @todo This workaround only affects bytea fields, but the involved field
// types involved in the query are unknown, so there is no way to
// conditionally execute this for affected queries only.
return parent::prepareQuery(preg_replace('/ ([^ ]+) +(I*LIKE|NOT +I*LIKE) /i', ' ${1}::text ${2} ', $query));
}
public function query($query, array $args = array(), $options = array()) {
$options += $this->defaultOptions();