{"action":"closed","number":44,"pull_request":{"url":"https://api.github.com/repos/wvanbergen/vertica/pulls/44","id":75090939,"html_url":"https://github.com/wvanbergen/vertica/pull/44","diff_url":"https://github.com/wvanbergen/vertica/pull/44.diff","patch_url":"https://github.com/wvanbergen/vertica/pull/44.patch","issue_url":"https://api.github.com/repos/wvanbergen/vertica/issues/44","number":44,"state":"closed","locked":false,"title":"Handle invalid unicode characters in SQL better","user":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"body":"This will make sure we don't raise encoding exceptions, and make sure the connection is not broken after dealing with encoding issues.\r\n\r\nHowever, this does mean that we return values that are invalid unicode (see the added test, `\"\\xA4\\xA2\"` is not a valid unicode string). It looks like Vertica is quite forgiving when it comes to that.\r\n\r\nThe alternative that code work is that we only accept unicode strings as SQL, and immediately raise an exception if a string cannot be transcoded to UTF-8.\r\n\r\n@civitaspo @maxd @bicyclethief Any thoughts on what the best way to deal with this scenario is?","created_at":"2016-06-24T09:58:49Z","updated_at":"2016-06-24T11:12:08Z","closed_at":"2016-06-24T11:12:08Z","merged_at":"2016-06-24T11:12:08Z","merge_commit_sha":"1854594d5371c552279c20081d02bf5e52167ec9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wvanbergen/vertica/pulls/44/commits","review_comments_url":"https://api.github.com/repos/wvanbergen/vertica/pulls/44/comments","review_comment_url":"https://api.github.com/repos/wvanbergen/vertica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wvanbergen/vertica/issues/44/comments","statuses_url":"https://api.github.com/repos/wvanbergen/vertica/statuses/25d6ee195cecdbe87a3e66a3f7637bdc85c0305a","head":{"label":"wvanbergen:sql_unicode_cleanup","ref":"sql_unicode_cleanup","sha":"25d6ee195cecdbe87a3e66a3f7637bdc85c0305a","user":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"repo":{"id":834542,"name":"vertica","full_name":"wvanbergen/vertica","owner":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wvanbergen/vertica","description":"Ruby adapter for Vertica databases","fork":false,"url":"https://api.github.com/repos/wvanbergen/vertica","forks_url":"https://api.github.com/repos/wvanbergen/vertica/forks","keys_url":"https://api.github.com/repos/wvanbergen/vertica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wvanbergen/vertica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wvanbergen/vertica/teams","hooks_url":"https://api.github.com/repos/wvanbergen/vertica/hooks","issue_events_url":"https://api.github.com/repos/wvanbergen/vertica/issues/events{/number}","events_url":"https://api.github.com/repos/wvanbergen/vertica/events","assignees_url":"https://api.github.com/repos/wvanbergen/vertica/assignees{/user}","branches_url":"https://api.github.com/repos/wvanbergen/vertica/branches{/branch}","tags_url":"https://api.github.com/repos/wvanbergen/vertica/tags","blobs_url":"https://api.github.com/repos/wvanbergen/vertica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wvanbergen/vertica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wvanbergen/vertica/git/refs{/sha}","trees_url":"https://api.github.com/repos/wvanbergen/vertica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wvanbergen/vertica/statuses/{sha}","languages_url":"https://api.github.com/repos/wvanbergen/vertica/languages","stargazers_url":"https://api.github.com/repos/wvanbergen/vertica/stargazers","contributors_url":"https://api.github.com/repos/wvanbergen/vertica/contributors","subscribers_url":"https://api.github.com/repos/wvanbergen/vertica/subscribers","subscription_url":"https://api.github.com/repos/wvanbergen/vertica/subscription","commits_url":"https://api.github.com/repos/wvanbergen/vertica/commits{/sha}","git_commits_url":"https://api.github.com/repos/wvanbergen/vertica/git/commits{/sha}","comments_url":"https://api.github.com/repos/wvanbergen/vertica/comments{/number}","issue_comment_url":"https://api.github.com/repos/wvanbergen/vertica/issues/comments{/number}","contents_url":"https://api.github.com/repos/wvanbergen/vertica/contents/{+path}","compare_url":"https://api.github.com/repos/wvanbergen/vertica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wvanbergen/vertica/merges","archive_url":"https://api.github.com/repos/wvanbergen/vertica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wvanbergen/vertica/downloads","issues_url":"https://api.github.com/repos/wvanbergen/vertica/issues{/number}","pulls_url":"https://api.github.com/repos/wvanbergen/vertica/pulls{/number}","milestones_url":"https://api.github.com/repos/wvanbergen/vertica/milestones{/number}","notifications_url":"https://api.github.com/repos/wvanbergen/vertica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wvanbergen/vertica/labels{/name}","releases_url":"https://api.github.com/repos/wvanbergen/vertica/releases{/id}","deployments_url":"https://api.github.com/repos/wvanbergen/vertica/deployments","created_at":"2010-08-12T22:05:18Z","updated_at":"2016-05-15T14:27:25Z","pushed_at":"2016-06-24T11:12:08Z","git_url":"git://github.com/wvanbergen/vertica.git","ssh_url":"git@github.com:wvanbergen/vertica.git","clone_url":"https://github.com/wvanbergen/vertica.git","svn_url":"https://github.com/wvanbergen/vertica","homepage":"http://vanbergen.org/vertica","size":293,"stargazers_count":60,"watchers_count":60,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":4,"forks":23,"open_issues":4,"watchers":60,"default_branch":"master"}},"base":{"label":"wvanbergen:master","ref":"master","sha":"9c5f28d3650df69f2c668451e10c37035b59f46a","user":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"repo":{"id":834542,"name":"vertica","full_name":"wvanbergen/vertica","owner":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wvanbergen/vertica","description":"Ruby adapter for Vertica databases","fork":false,"url":"https://api.github.com/repos/wvanbergen/vertica","forks_url":"https://api.github.com/repos/wvanbergen/vertica/forks","keys_url":"https://api.github.com/repos/wvanbergen/vertica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wvanbergen/vertica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wvanbergen/vertica/teams","hooks_url":"https://api.github.com/repos/wvanbergen/vertica/hooks","issue_events_url":"https://api.github.com/repos/wvanbergen/vertica/issues/events{/number}","events_url":"https://api.github.com/repos/wvanbergen/vertica/events","assignees_url":"https://api.github.com/repos/wvanbergen/vertica/assignees{/user}","branches_url":"https://api.github.com/repos/wvanbergen/vertica/branches{/branch}","tags_url":"https://api.github.com/repos/wvanbergen/vertica/tags","blobs_url":"https://api.github.com/repos/wvanbergen/vertica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wvanbergen/vertica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wvanbergen/vertica/git/refs{/sha}","trees_url":"https://api.github.com/repos/wvanbergen/vertica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wvanbergen/vertica/statuses/{sha}","languages_url":"https://api.github.com/repos/wvanbergen/vertica/languages","stargazers_url":"https://api.github.com/repos/wvanbergen/vertica/stargazers","contributors_url":"https://api.github.com/repos/wvanbergen/vertica/contributors","subscribers_url":"https://api.github.com/repos/wvanbergen/vertica/subscribers","subscription_url":"https://api.github.com/repos/wvanbergen/vertica/subscription","commits_url":"https://api.github.com/repos/wvanbergen/vertica/commits{/sha}","git_commits_url":"https://api.github.com/repos/wvanbergen/vertica/git/commits{/sha}","comments_url":"https://api.github.com/repos/wvanbergen/vertica/comments{/number}","issue_comment_url":"https://api.github.com/repos/wvanbergen/vertica/issues/comments{/number}","contents_url":"https://api.github.com/repos/wvanbergen/vertica/contents/{+path}","compare_url":"https://api.github.com/repos/wvanbergen/vertica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wvanbergen/vertica/merges","archive_url":"https://api.github.com/repos/wvanbergen/vertica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wvanbergen/vertica/downloads","issues_url":"https://api.github.com/repos/wvanbergen/vertica/issues{/number}","pulls_url":"https://api.github.com/repos/wvanbergen/vertica/pulls{/number}","milestones_url":"https://api.github.com/repos/wvanbergen/vertica/milestones{/number}","notifications_url":"https://api.github.com/repos/wvanbergen/vertica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wvanbergen/vertica/labels{/name}","releases_url":"https://api.github.com/repos/wvanbergen/vertica/releases{/id}","deployments_url":"https://api.github.com/repos/wvanbergen/vertica/deployments","created_at":"2010-08-12T22:05:18Z","updated_at":"2016-05-15T14:27:25Z","pushed_at":"2016-06-24T11:12:08Z","git_url":"git://github.com/wvanbergen/vertica.git","ssh_url":"git@github.com:wvanbergen/vertica.git","clone_url":"https://github.com/wvanbergen/vertica.git","svn_url":"https://github.com/wvanbergen/vertica","homepage":"http://vanbergen.org/vertica","size":293,"stargazers_count":60,"watchers_count":60,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":4,"forks":23,"open_issues":4,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wvanbergen/vertica/pulls/44"},"html":{"href":"https://github.com/wvanbergen/vertica/pull/44"},"issue":{"href":"https://api.github.com/repos/wvanbergen/vertica/issues/44"},"comments":{"href":"https://api.github.com/repos/wvanbergen/vertica/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/wvanbergen/vertica/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/wvanbergen/vertica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wvanbergen/vertica/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/wvanbergen/vertica/statuses/25d6ee195cecdbe87a3e66a3f7637bdc85c0305a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":34,"deletions":23,"changed_files":3}}
{"actor":{"display_login":"wvanbergen"}}