Some information about my environment:

* Ubuntu 18.04
* PHP 7.2
* PostgreSQL 10
* Drupal 8.8.x-dev

There's an unescaped field name reference in the PostgreSQL implementation of createFieldSql (https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...).

This was actually encountered while attempting to install the https://www.drupal.org/project/rest_oai_pmh module. In the install file (https://git.drupalcode.org/project/rest_oai_pmh/blob/80015646433d367bcfd...), the rest_oai_pmh_set table is adding a "limit" field that is unsigned, triggering the chunk in createFieldSql that adds " CHECK ({$name} >= 0)" to the field definition.

The result of this is the following error when attempting to install the module:

SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near \"limit\" \n LINE 6: \"limit\" bigint CHECK (limit >= 0) NOT NULL default 10

Haven't really dug into this enough to determine if this is the specific issue, but I kind of want to poke at it some more to see if:

* changing that field name would fix it
* using other reserved SQL terms would break in the same way

I guess you could say the implementer can just not use reserved SQL terms, but on the other hand, this is kind of a ticking time bomb if you're using PostgreSQL where suddenly your installed modules could fail during a DB update, or a deployment could just blow up because you switched from MySQL to PostgreSQL.

Comments

qadan created an issue. See original summary.

qadan’s picture

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

daffie’s picture

Status: Active » Closed (duplicate)