diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php index f081eff..a6db219 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php @@ -211,7 +211,7 @@ public function prepareQuery($query) { // @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)); + return parent::prepareQuery(preg_replace('/ ([^ ]+) +(I*LIKE|NOT +I*LIKE|~\*|~) /i', ' ${1}::text ${2} ', $query)); } public function queryRange($query, $from, $count, array $args = array(), array $options = array()) { diff --git a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php index 088a209..678375a 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FilterNumericTest.php @@ -219,7 +219,7 @@ public function testFilterNumericRegularExpression() { $view = Views::getView('test_view'); $view->setDisplay(); - // Change the filtering + // Filtering by regular expression syntax $view->displayHandlers->get('default')->overrideOption('filters', array( 'age' => array( 'id' => 'age', @@ -257,7 +257,6 @@ public function testFilterNumericExposedGroupedRegularExpression() { $view->setDisplay('page_1'); $view->displayHandlers->get('page_1')->overrideOption('filters', $filters); $view->save(); - $this->container->get('router.builder')->rebuild(); $this->executeView($view); $resultset = array(