aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2024-04-17 11:19:04 +0200
committerGitHub <noreply@github.com>2024-04-17 11:19:04 +0200
commit88859aa41cda5140f6c6d55eab58418153c0744c (patch)
tree3de9ea8d48a023fca3753fc5b0cf44f3d1feed46 /lib
parentc4370b625b1d24f8646a7cd87e07d138068efbdb (diff)
parent2cabc708fbb2aab8e0f6d90155bd253041767f39 (diff)
downloadnextcloud-server-88859aa41cda5140f6c6d55eab58418153c0744c.tar.gz
nextcloud-server-88859aa41cda5140f6c6d55eab58418153c0744c.zip
Merge pull request #44461 from nextcloud/backport/44394/stable28
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/ConnectionFactory.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php
index 4b286ff5442..11b17795634 100644
--- a/lib/private/DB/ConnectionFactory.php
+++ b/lib/private/DB/ConnectionFactory.php
@@ -132,6 +132,7 @@ class ConnectionFactory {
$eventManager->addEventSubscriber(
new SQLSessionInit("SET SESSION AUTOCOMMIT=1"));
break;
+
case 'oci':
$eventManager->addEventSubscriber(new OracleSessionInit);
// the driverOptions are unused in dbal and need to be mapped to the parameters
@@ -151,6 +152,15 @@ class ConnectionFactory {
unset($additionalConnectionParams['host']);
break;
+ case 'pgsql':
+ // pg_connect used by Doctrine DBAL does not support URI notation (enclosed in brackets)
+ $matches = [];
+ if (preg_match('/^\[([^\]]+)\]$/', $additionalConnectionParams['host'], $matches)) {
+ // Host variable carries a port or socket.
+ $additionalConnectionParams['host'] = $matches[1];
+ }
+ break;
+
case 'sqlite3':
$journalMode = $additionalConnectionParams['sqlite.journal_mode'];
$additionalConnectionParams['platform'] = new OCSqlitePlatform();