{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/comments/27675988","id":27675988,"diff_hunk":"@@ -53,6 +53,14 @@ public function connect(array $params, $username = null, $password = null, array\n                 $pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);\n             }\n \n+            /* defining client_encoding via SET NAMES to avoid inconsistent DSN support\n+             * - the 'client_encoding' connection param only works with postgres >= 9.1\n+             * - passing client_encoding via the 'options' param breaks pgbouncer support\n+             */\n+            if (isset($params['charset'])) {\n+              $pdo->query('SET NAMES \\''.$params['charset'].'\\'');","path":"lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php","position":9,"original_position":9,"commit_id":"cef58bdb516c67cc8b814c8aada2c2dde3ef4198","original_commit_id":"cef58bdb516c67cc8b814c8aada2c2dde3ef4198","user":{"login":"deeky666","id":1411514,"avatar_url":"https://avatars.githubusercontent.com/u/1411514?v=3","gravatar_id":"","url":"https://api.github.com/users/deeky666","html_url":"https://github.com/deeky666","followers_url":"https://api.github.com/users/deeky666/followers","following_url":"https://api.github.com/users/deeky666/following{/other_user}","gists_url":"https://api.github.com/users/deeky666/gists{/gist_id}","starred_url":"https://api.github.com/users/deeky666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeky666/subscriptions","organizations_url":"https://api.github.com/users/deeky666/orgs","repos_url":"https://api.github.com/users/deeky666/repos","events_url":"https://api.github.com/users/deeky666/events{/privacy}","received_events_url":"https://api.github.com/users/deeky666/received_events","type":"User","site_admin":false},"body":"No I don't use that in any application. Just for development of DBAL/ORM","created_at":"2015-04-02T17:00:13Z","updated_at":"2015-04-02T17:00:13Z","html_url":"https://github.com/doctrine/dbal/pull/828#discussion_r27675988","pull_request_url":"https://api.github.com/repos/doctrine/dbal/pulls/828","_links":{"self":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/comments/27675988"},"html":{"href":"https://github.com/doctrine/dbal/pull/828#discussion_r27675988"},"pull_request":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/828"}}},"pull_request":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/828","id":32522087,"html_url":"https://github.com/doctrine/dbal/pull/828","diff_url":"https://github.com/doctrine/dbal/pull/828.diff","patch_url":"https://github.com/doctrine/dbal/pull/828.patch","issue_url":"https://api.github.com/repos/doctrine/dbal/issues/828","number":828,"state":"closed","locked":false,"title":"rehashed charset implementation to support old versions of postgresql","user":{"login":"rocksfrow","id":620091,"avatar_url":"https://avatars.githubusercontent.com/u/620091?v=3","gravatar_id":"","url":"https://api.github.com/users/rocksfrow","html_url":"https://github.com/rocksfrow","followers_url":"https://api.github.com/users/rocksfrow/followers","following_url":"https://api.github.com/users/rocksfrow/following{/other_user}","gists_url":"https://api.github.com/users/rocksfrow/gists{/gist_id}","starred_url":"https://api.github.com/users/rocksfrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocksfrow/subscriptions","organizations_url":"https://api.github.com/users/rocksfrow/orgs","repos_url":"https://api.github.com/users/rocksfrow/repos","events_url":"https://api.github.com/users/rocksfrow/events{/privacy}","received_events_url":"https://api.github.com/users/rocksfrow/received_events","type":"User","site_admin":false},"body":"My previous client_encoding fix turned out not to work on older postgres versions -- BUT, the options param isn't supported by pgbouncer at all. SO, because there isn't consistent behavior with setting the character set via DSN - this change utilizes `SET NAMES`. I used SET NAMES since that is SQL standard and supported by PG.\r\n\r\nI confirmed `SET NAMES` is supported all the way back to the older doc PG has, 7.1: http://www.postgresql.org/docs/7.1/static/multibyte.html","created_at":"2015-04-02T15:29:31Z","updated_at":"2015-04-02T17:00:13Z","closed_at":"2015-04-02T16:03:28Z","merged_at":"2015-04-02T16:03:28Z","merge_commit_sha":"ab1e44a53ff7b7278c9a266d6b7df7660b06afdc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/dbal/pulls/828/commits","review_comments_url":"https://api.github.com/repos/doctrine/dbal/pulls/828/comments","review_comment_url":"https://api.github.com/repos/doctrine/dbal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/dbal/issues/828/comments","statuses_url":"https://api.github.com/repos/doctrine/dbal/statuses/cef58bdb516c67cc8b814c8aada2c2dde3ef4198","head":{"label":"rocksfrow:master","ref":"master","sha":"cef58bdb516c67cc8b814c8aada2c2dde3ef4198","user":{"login":"rocksfrow","id":620091,"avatar_url":"https://avatars.githubusercontent.com/u/620091?v=3","gravatar_id":"","url":"https://api.github.com/users/rocksfrow","html_url":"https://github.com/rocksfrow","followers_url":"https://api.github.com/users/rocksfrow/followers","following_url":"https://api.github.com/users/rocksfrow/following{/other_user}","gists_url":"https://api.github.com/users/rocksfrow/gists{/gist_id}","starred_url":"https://api.github.com/users/rocksfrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocksfrow/subscriptions","organizations_url":"https://api.github.com/users/rocksfrow/orgs","repos_url":"https://api.github.com/users/rocksfrow/repos","events_url":"https://api.github.com/users/rocksfrow/events{/privacy}","received_events_url":"https://api.github.com/users/rocksfrow/received_events","type":"User","site_admin":false},"repo":{"id":32964589,"name":"dbal","full_name":"rocksfrow/dbal","owner":{"login":"rocksfrow","id":620091,"avatar_url":"https://avatars.githubusercontent.com/u/620091?v=3","gravatar_id":"","url":"https://api.github.com/users/rocksfrow","html_url":"https://github.com/rocksfrow","followers_url":"https://api.github.com/users/rocksfrow/followers","following_url":"https://api.github.com/users/rocksfrow/following{/other_user}","gists_url":"https://api.github.com/users/rocksfrow/gists{/gist_id}","starred_url":"https://api.github.com/users/rocksfrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocksfrow/subscriptions","organizations_url":"https://api.github.com/users/rocksfrow/orgs","repos_url":"https://api.github.com/users/rocksfrow/repos","events_url":"https://api.github.com/users/rocksfrow/events{/privacy}","received_events_url":"https://api.github.com/users/rocksfrow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rocksfrow/dbal","description":"Doctrine Database Abstraction Layer","fork":true,"url":"https://api.github.com/repos/rocksfrow/dbal","forks_url":"https://api.github.com/repos/rocksfrow/dbal/forks","keys_url":"https://api.github.com/repos/rocksfrow/dbal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rocksfrow/dbal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rocksfrow/dbal/teams","hooks_url":"https://api.github.com/repos/rocksfrow/dbal/hooks","issue_events_url":"https://api.github.com/repos/rocksfrow/dbal/issues/events{/number}","events_url":"https://api.github.com/repos/rocksfrow/dbal/events","assignees_url":"https://api.github.com/repos/rocksfrow/dbal/assignees{/user}","branches_url":"https://api.github.com/repos/rocksfrow/dbal/branches{/branch}","tags_url":"https://api.github.com/repos/rocksfrow/dbal/tags","blobs_url":"https://api.github.com/repos/rocksfrow/dbal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rocksfrow/dbal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rocksfrow/dbal/git/refs{/sha}","trees_url":"https://api.github.com/repos/rocksfrow/dbal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rocksfrow/dbal/statuses/{sha}","languages_url":"https://api.github.com/repos/rocksfrow/dbal/languages","stargazers_url":"https://api.github.com/repos/rocksfrow/dbal/stargazers","contributors_url":"https://api.github.com/repos/rocksfrow/dbal/contributors","subscribers_url":"https://api.github.com/repos/rocksfrow/dbal/subscribers","subscription_url":"https://api.github.com/repos/rocksfrow/dbal/subscription","commits_url":"https://api.github.com/repos/rocksfrow/dbal/commits{/sha}","git_commits_url":"https://api.github.com/repos/rocksfrow/dbal/git/commits{/sha}","comments_url":"https://api.github.com/repos/rocksfrow/dbal/comments{/number}","issue_comment_url":"https://api.github.com/repos/rocksfrow/dbal/issues/comments{/number}","contents_url":"https://api.github.com/repos/rocksfrow/dbal/contents/{+path}","compare_url":"https://api.github.com/repos/rocksfrow/dbal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rocksfrow/dbal/merges","archive_url":"https://api.github.com/repos/rocksfrow/dbal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rocksfrow/dbal/downloads","issues_url":"https://api.github.com/repos/rocksfrow/dbal/issues{/number}","pulls_url":"https://api.github.com/repos/rocksfrow/dbal/pulls{/number}","milestones_url":"https://api.github.com/repos/rocksfrow/dbal/milestones{/number}","notifications_url":"https://api.github.com/repos/rocksfrow/dbal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rocksfrow/dbal/labels{/name}","releases_url":"https://api.github.com/repos/rocksfrow/dbal/releases{/id}","created_at":"2015-03-27T02:53:34Z","updated_at":"2015-04-02T16:17:21Z","pushed_at":"2015-04-02T16:17:21Z","git_url":"git://github.com/rocksfrow/dbal.git","ssh_url":"git@github.com:rocksfrow/dbal.git","clone_url":"https://github.com/rocksfrow/dbal.git","svn_url":"https://github.com/rocksfrow/dbal","homepage":"http://www.doctrine-project.org/projects/dbal","size":20918,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"doctrine:master","ref":"master","sha":"8e65cdc780e7deb129f9e792dc929ba8792ac67e","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":677464,"name":"dbal","full_name":"doctrine/dbal","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/dbal","description":"Doctrine Database Abstraction Layer","fork":false,"url":"https://api.github.com/repos/doctrine/dbal","forks_url":"https://api.github.com/repos/doctrine/dbal/forks","keys_url":"https://api.github.com/repos/doctrine/dbal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/dbal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/dbal/teams","hooks_url":"https://api.github.com/repos/doctrine/dbal/hooks","issue_events_url":"https://api.github.com/repos/doctrine/dbal/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/dbal/events","assignees_url":"https://api.github.com/repos/doctrine/dbal/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/dbal/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/dbal/tags","blobs_url":"https://api.github.com/repos/doctrine/dbal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/dbal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/dbal/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/dbal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/dbal/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/dbal/languages","stargazers_url":"https://api.github.com/repos/doctrine/dbal/stargazers","contributors_url":"https://api.github.com/repos/doctrine/dbal/contributors","subscribers_url":"https://api.github.com/repos/doctrine/dbal/subscribers","subscription_url":"https://api.github.com/repos/doctrine/dbal/subscription","commits_url":"https://api.github.com/repos/doctrine/dbal/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/dbal/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/dbal/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/dbal/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/dbal/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/dbal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/dbal/merges","archive_url":"https://api.github.com/repos/doctrine/dbal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/dbal/downloads","issues_url":"https://api.github.com/repos/doctrine/dbal/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/dbal/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/dbal/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/dbal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/dbal/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/dbal/releases{/id}","created_at":"2010-05-20T17:01:42Z","updated_at":"2015-04-02T16:03:31Z","pushed_at":"2015-04-02T16:46:37Z","git_url":"git://github.com/doctrine/dbal.git","ssh_url":"git@github.com:doctrine/dbal.git","clone_url":"https://github.com/doctrine/dbal.git","svn_url":"https://github.com/doctrine/dbal","homepage":"http://www.doctrine-project.org/projects/dbal","size":29941,"stargazers_count":586,"watchers_count":586,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":520,"mirror_url":null,"open_issues_count":41,"forks":520,"open_issues":41,"watchers":586,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/828"},"html":{"href":"https://github.com/doctrine/dbal/pull/828"},"issue":{"href":"https://api.github.com/repos/doctrine/dbal/issues/828"},"comments":{"href":"https://api.github.com/repos/doctrine/dbal/issues/828/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/828/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/dbal/pulls/828/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/dbal/statuses/cef58bdb516c67cc8b814c8aada2c2dde3ef4198"}}}}