Revert "Issue #2560897 by alexpott: Drupal\user\Plugin\views\argument\RolesRid is very broken"
This reverts commit f3040e71cb
.
8.0.x
parent
496f5533f7
commit
ca9f58547a
|
@ -70,22 +70,11 @@ class Connection extends DatabaseConnection {
|
|||
// Force PostgreSQL to use the UTF-8 character set by default.
|
||||
$this->connection->exec("SET NAMES 'UTF8'");
|
||||
|
||||
// Set PostgreSQL init_commands if not already defined.
|
||||
$connection_options += array(
|
||||
'init_commands' => array(),
|
||||
);
|
||||
|
||||
$connection_options['init_commands'] += array(
|
||||
// Set standard_conforming_strings to off so as to treat backslashes as
|
||||
// escape characters, complying with historical PostgreSQL behavior. In
|
||||
// PostgreSQL 9.1 and up this is on by default, however Drupal still
|
||||
// assumes this to be off.
|
||||
'standard_conforming_strings' => 'SET standard_conforming_strings = off',
|
||||
);
|
||||
|
||||
// Execute PostgreSQL init_commands.
|
||||
if (isset($connection_options['init_commands'])) {
|
||||
$this->connection->exec(implode('; ', $connection_options['init_commands']));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -721,7 +721,7 @@ class Schema extends DatabaseSchema {
|
|||
// Convert to a bytea type by using the SQL replace() function to
|
||||
// convert any single backslashes in the field content to double
|
||||
// backslashes ('\' to '\\').
|
||||
$this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $field_def . ' USING convert_to("' . $field . '", ' . "'UTF8')");
|
||||
$this->connection->query('ALTER TABLE {' . $table . '} ALTER "' . $field . '" TYPE ' . $field_def . ' USING decode(replace("' . $field . '"' . ", '\\', '\\\\'), 'escape');");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue