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
3aae47ae
Commit
3aae47ae
authored
Dec 18, 2013
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #424 from deeky666/DBAL-567
[DBAL-567] Add charset option for pdo_pgsql driver
parents
337032d4
36fa4101
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
configuration.rst
docs/en/reference/configuration.rst
+2
-0
Driver.php
lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
+4
-0
No files found.
docs/en/reference/configuration.rst
View file @
3aae47ae
...
...
@@ -156,6 +156,8 @@ 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.
- ``charset`` (string): The charset used when connecting to the
database.
- ``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:
...
...
lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
View file @
3aae47ae
...
...
@@ -71,6 +71,10 @@ class Driver implements \Doctrine\DBAL\Driver, ExceptionConverterDriver
$dsn
.=
'dbname='
.
$params
[
'dbname'
]
.
' '
;
}
if
(
isset
(
$params
[
'charset'
]))
{
$dsn
.=
"options='--client_encoding="
.
$params
[
'charset'
]
.
"'"
;
}
if
(
isset
(
$params
[
'sslmode'
]))
{
$dsn
.=
'sslmode='
.
$params
[
'sslmode'
]
.
' '
;
}
...
...
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