By way of feature request, this login should also support _all_ of the login possibilities supported by PostgreSQL, including SSL, certificates, etc., for the very many environments in which the webserver and DB server are separate machines. In our case, they may be separated by continents... Yes, I'll post this as a feature request.

Issue fork drupal-850600

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

mikey_p’s picture

Title: Logon to PostgreSQL - using settings.php - doesn't permit 'real' names... » PostgreSQL driver doesn't support SSL option

Changing the name to reflect the real request here, and not duplicate #850592: Logon to PostgreSQL doesn't permit 'real' names....

damien tournoud’s picture

Status: Active » Closed (won't fix)

PDO_pgsql doesn't support SSL, so there is nothing we can do about it here. Please open a feature request on php.net if you feel SSL support is important.

tamasd’s picture

Version: 7.0-alpha6 » 8.2.x-dev
Assigned: Unassigned » tamasd
Issue summary: View changes
Status: Closed (won't fix) » Needs review
StatusFileSize
new1.19 KB

Altough the PDO driver does not support the SSL options for PostgreSQL, adding the options into the DSN works. I created a patch that makes possible to operate Drupal in an environment where PostgreSQL requires SSL and client certificates to work. The ideal solution would be if the DSN could be specified directly through settings.php, but that is a bigger effort.

With this patch, Drupal can be installed through Drush.

bzrudi71’s picture

Issue tags: +PostgreSQL

Adding tag and requested PG bot run.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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.

ElToundriko’s picture

Works with Drupal 9.3.4, PHP 8.1.4 and postgreSQL 13.5. It would be a nice feature; how is the review working on this one ?

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.

joseph.olstad’s picture

Version: 9.5.x-dev » 9.4.x-dev
Assigned: tamasd » joseph.olstad
Status: Needs review » Needs work

Needs a reroll.

In 9.4.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php became deprecated.

 @deprecated in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL
 *   database driver has been moved to the pgsql module.
joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.2 KB
joseph.olstad’s picture

Status: Needs review » Needs work

test bot issue

--- Commands Executed ---
core/scripts/dev/commit-code-check.sh --drupalci
Return Code: 1
--- Output ---
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:116:37 - Unknown word (sslmode)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:117:17 - Unknown word (sslmode)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:117:50 - Unknown word (sslmode)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:122:37 - Unknown word (sslkey)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:123:17 - Unknown word (sslkey)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:123:49 - Unknown word (sslkey)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:125:37 - Unknown word (sslrootcert)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:126:17 - Unknown word (sslrootcert)
/var/www/html/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php:126:54 - Unknown word (sslrootcert)

CSpell: failed

Not sure what to do about this.

mradcliffe’s picture

Drupal core runs cspell to spell check files in the project. We need to add words to its dictionary / ignore list.

"if there's an unrecognized English word or a correctly spelled technical term, add it to the Drupal dictionary file: core/misc/cspell/dictionary.txt (Note: all words in the dictionary must be lowercase)"

dictionary.txt is sorted alphabetically (a-z) so sslkey, sslmode, sslrootcert should follow after "ssid" in that file.

daffie’s picture

You fix those style guide violations by adding the following to the class file:

// cSpell:ignore sslmode sslkey sslrootcert

Insert it after the use-statements and before the class declaration.

joseph.olstad’s picture

StatusFileSize
new1.5 KB

Thanks for suggestions, trying the core misc cspell dictionary.txt

joseph.olstad’s picture

Status: Needs work » Needs review

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

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should 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.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.04 KB

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nod_’s picture

Status: Needs work » Needs review

Disregard comment #26, bug in the bot script

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests

Seems like a feature that will need test coverage also.

Thanks.

smulvih2’s picture

Version: 9.5.x-dev » 10.1.x-dev
StatusFileSize
new1.51 KB

I'm using this patch in a project where we just upgraded to core 10.1.6. The changes to dictionary.txt were not applying, so re-rolling patch to apply.

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

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joseph.olstad’s picture

Just so our patches do not get forgotten:
The WxT distribution is still using this patch, between 200 and 300 installs, multiple public sector organizations, multiple installs in each organization.

steinmb made their first commit to this issue’s fork.

steinmb changed the visibility of the branch 850600-postgresql-driver-doesnt to hidden.

revathidinesh’s picture

@smulvih2 Shall I use the below patch in my Drupal 10.2.5 version?
https://www.drupal.org/files/issues/2023-11-14/postgresql-ssl-dns-850600...

smulvih2’s picture

StatusFileSize
new1.5 KB

Updating patch for 10.3.x. Looks like some items in dictionary.txt were removed since 10.1.x.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.