-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add charset option for pdo_pgsql driver
add charset option for pdo_pgsql driver
- Loading branch information
Showing
2 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gentlemen, when using the charset string with pgbouncer we are given an error:
2014-06-11 14:47:11.061 319 WARNING C-0x1071580: (nodb)/(nouser)@127.0.0.1:34024 unsupported startup parameter: options=--client_encoding=UTF8
2014-06-11 14:47:11.061 319 LOG C-0x1071580: (nodb)/(nouser)@127.0.0.1:34024 closing because: Unsupported startup parameter: options (age=0)
2014-06-11 14:47:11.061 319 WARNING C-0x1071580: (nodb)/(nouser)@127.0.0.1:34024 Pooler Error: Unsupported startup parameter: options
In order to fix this issue with pgbouncer, we would require the '--client_encoding=' argument to be set to 'client_encoding.'
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adgeese please open an issue about it on http://www.doctrine-project.org/jira/browse/DBAL
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adgeese have you reported an issue for this?
@Ocramius I too am experiencing this issue -- it's definitely a problem with pgbouncer.
pgbouncer doesn't like that option format -- this is not a pgbouncer bug but indeed a dbal issue.
Here is a very similar issue/pull request from node.js's pgsql driver resolving the exact same issue:
brianc/node-postgres#356
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This renders DBAL unusable with pgbouncer -- I am forced to downgrade.
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ocramius this is the exact same change that needs to be made:
Hebo/node-postgres@323a2f9
I'll see if I can find a bug report -- if not maybe I can create a pull request.
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just confirmed the fix works locally... IE, passing the client_encoding parameter directly rather than through the 'options' parameter
36fa410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ocramius I confirmed a bug report was never filed. I've fixed the bug and filed a pull request.
#823