Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
99aadcb8
Commit
99aadcb8
authored
Dec 18, 2013
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #446 from deeky666/DBAL-702
[DBAL-702] Add sslmode connection option to pdo_pgsql driver
parents
390db30f
160a1678
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
configuration.rst
docs/en/reference/configuration.rst
+4
-0
Driver.php
lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
+7
-0
No files found.
docs/en/reference/configuration.rst
View file @
99aadcb8
...
...
@@ -156,6 +156,10 @@ pdo\_pgsql
- ``host`` (string): Hostname of the database to connect to.
- ``port`` (integer): Port of the database to connect to.
- ``dbname`` (string): Name of the database/schema to connect to.
- ``sslmode`` (string): Determines whether or with what priority
a SSL TCP/IP connection will be negotiated with the server.
See the list of available modes:
`http://www.postgresql.org/docs/9.1/static/libpq-connect.html#LIBPQ-CONNECT-SSLMODE`
PostgreSQL behaves differently with regard to booleans when you use
``PDO::ATTR_EMULATE_PREPARES`` or not. To switch from using ``'true'``
...
...
lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
View file @
99aadcb8
...
...
@@ -58,16 +58,23 @@ class Driver implements \Doctrine\DBAL\Driver, ExceptionConverterDriver
private
function
_constructPdoDsn
(
array
$params
)
{
$dsn
=
'pgsql:'
;
if
(
isset
(
$params
[
'host'
])
&&
$params
[
'host'
]
!=
''
)
{
$dsn
.=
'host='
.
$params
[
'host'
]
.
' '
;
}
if
(
isset
(
$params
[
'port'
])
&&
$params
[
'port'
]
!=
''
)
{
$dsn
.=
'port='
.
$params
[
'port'
]
.
' '
;
}
if
(
isset
(
$params
[
'dbname'
]))
{
$dsn
.=
'dbname='
.
$params
[
'dbname'
]
.
' '
;
}
if
(
isset
(
$params
[
'sslmode'
]))
{
$dsn
.=
'sslmode='
.
$params
[
'sslmode'
]
.
' '
;
}
return
$dsn
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment