Problem/Motivation
PgsqlRequirements::getRequirements() uses the following code.
// If the extension is not available, set the requirement error.
if (!$connection->schema()->extensionExists('pg_trgm')) {
$requirements['pgsql_extension_pg_trgm']['severity'] = RequirementSeverity::Error;
$requirements['pgsql_extension_pg_trgm']['value'] = t('Not created');
$requirements['pgsql_extension_pg_trgm']['description'] = t('The <a href=":pg_trgm">pg_trgm</a> PostgreSQL extension is not present. The extension is required by Drupal to improve performance when using PostgreSQL. See <a href=":requirements">Drupal database server requirements</a> for more information.', [
':pg_trgm' => 'https://www.postgresql.org/docs/current/pgtrgm.html',
':requirements' => 'https://www.drupal.org/docs/system-requirements/database-server-requirements',
]);
}
When the extension is not available, it shows Not created.
Proposed resolution
Change that code to the following one.
// If the extension is not available, set the requirement error.
if (!$connection->schema()->extensionExists('pg_trgm')) {
$requirements['pgsql_extension_pg_trgm']['severity'] = RequirementSeverity::Error;
$requirements['pgsql_extension_pg_trgm']['value'] = t('Not available');
$requirements['pgsql_extension_pg_trgm']['description'] = t('The <a href=":pg_trgm">pg_trgm</a> PostgreSQL extension is not present. The extension is required by Drupal to improve performance when using PostgreSQL. See <a href=":requirements">Drupal database server requirements</a> for more information.', [
':pg_trgm' => 'https://www.postgresql.org/docs/current/pgtrgm.html',
':requirements' => 'https://www.drupal.org/docs/system-requirements/database-server-requirements',
]);
}
Instead of t('Not created'), it uses t('Not available'), which is more correct, since a database engine extension is not created.
Comments
Comment #3
avpadernoComment #4
avpadernoComment #5
smustgrave commentedPretty straight forward.
Comment #8
godotislateCommitted and pushed 7b2d8ee to main and 51c6f76 to 11.x. Thanks!