Unverified Commit 660152c4 authored by alexpott's avatar alexpott

Issue #2921665 by RoSk0, daffie: PostgreSQL: Optimize getting maxIdentifierLength

parent 925b4b56
......@@ -68,7 +68,9 @@ protected function ensureIdentifiersLength($identifier) {
// Retrieve the max identifier length which is usually 63 characters
// but can be altered before PostgreSQL is compiled so we need to check.
$this->maxIdentifierLength = $this->connection->query("SHOW max_identifier_length")->fetchField();
if (empty($this->maxIdentifierLength)) {
$this->maxIdentifierLength = $this->connection->query("SHOW max_identifier_length")->fetchField();
}
if (strlen($identifierName) > $this->maxIdentifierLength) {
$saveIdentifier = '"drupal_' . $this->hashBase64($identifierName) . '_' . $args[2] . '"';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment