This issue has been split from the meta/parent issue #2001350: [meta] Drupal cannot be installed on PostgreSQL.
Updated: Comment #2

Problem/Motivation

Prevent pgsql driver from trying to implode primary key fields that are defined by an array (column, key_length) as that syntax is not supported. See Comment #75.

This change to primary key schema syntax was made as part of #731724: Convert comment settings into a field to make them work with CMI and non-node entities .

Proposed resolution

Implement createPrimaryKeySql() in core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php to account for new primary key schema syntax.

Remaining tasks

  • Create a smaller patch from the patch in the parent issue.
  • This patch cannot be tested in PostgreSQL until the transaction bug is fixed because Drupal cannot be installed. However the bug has a known and working fix from the parent issue.
  • Create follow-up issue to fix method names in pgsql driver to match standard per Crell's comment.

API changes

New method createPrimaryKeySql() which matches other database drivers.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mradcliffe’s picture

Priority: Major » Critical
mradcliffe’s picture

Created patch with resolution from parent issue, and removed the leading underscore from the method name.

Added more information to issue summary about the cause of the issue.

bzrudi71’s picture

Just applied patch and it works as expected. As this patch only affects the PostgreSQL driver itself I see no side issues with that, so we should get this in. Especially as PostgreSQL testbot is now up and running and the issue from PostgreSQL failed to connect seems gone.

mradcliffe’s picture

2: drupal-2181283-pgsql-primary-key-1.patch queued for re-testing.

It's been a week making sure patch still applies.

mradcliffe’s picture

Status: Needs review » Reviewed & tested by the community

Updating to RTBC because the changes from the review in the meta issue were made and the patch was reviewed and tested in two issues.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Since this code only affects pgsql, it's unlikely to cause breakage anywhere else. So if it works for you folks, it works for me. :)

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.