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.

Issue fork drupal-3606322

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review
avpaderno’s picture

Issue summary: View changes
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Pretty straight forward.

  • godotislate committed 51c6f76c on 11.x
    fix: #3606322 PgsqlRequirements::getRequirements() reports a PostgreSQL...

  • godotislate committed 7b2d8ee6 on main
    fix: #3606322 PgsqlRequirements::getRequirements() reports a PostgreSQL...
godotislate’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 7b2d8ee to main and 51c6f76 to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.