{"action":"created","issue":{"url":"https://api.github.com/repos/getredash/redash/issues/1056","repository_url":"https://api.github.com/repos/getredash/redash","labels_url":"https://api.github.com/repos/getredash/redash/issues/1056/labels{/name}","comments_url":"https://api.github.com/repos/getredash/redash/issues/1056/comments","events_url":"https://api.github.com/repos/getredash/redash/issues/1056/events","html_url":"https://github.com/getredash/redash/issues/1056","id":154822797,"number":1056,"title":"PostgreSQL passwords with spaces are not supported","user":{"login":"jhollowayj","id":7515474,"avatar_url":"https://avatars.githubusercontent.com/u/7515474?v=3","gravatar_id":"","url":"https://api.github.com/users/jhollowayj","html_url":"https://github.com/jhollowayj","followers_url":"https://api.github.com/users/jhollowayj/followers","following_url":"https://api.github.com/users/jhollowayj/following{/other_user}","gists_url":"https://api.github.com/users/jhollowayj/gists{/gist_id}","starred_url":"https://api.github.com/users/jhollowayj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhollowayj/subscriptions","organizations_url":"https://api.github.com/users/jhollowayj/orgs","repos_url":"https://api.github.com/users/jhollowayj/repos","events_url":"https://api.github.com/users/jhollowayj/events{/privacy}","received_events_url":"https://api.github.com/users/jhollowayj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/getredash/redash/labels/Backend","name":"Backend","color":"0052cc"},{"url":"https://api.github.com/repos/getredash/redash/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-14T00:16:20Z","updated_at":"2016-05-16T18:38:36Z","closed_at":null,"body":"The connection info string on line /opt/redash/current/redash/query_runner/pg.py cant contain spaces, so something like `host=hostname password=my secret password dbname=awesome_db_name user=postgres` will throw the error `OperationalError: missing \"=\" after \"secret\" in connection info string`.\r\n\r\nError happens at [pg.py#L117](https://github.com/getredash/redash/blob/fbb81b62d6c79f8e9381ac8973ac34739bfa6b41/redash/query_runner/pg.py#L117), but the connection string is built [pg.py#L87](https://github.com/getredash/redash/blob/fbb81b62d6c79f8e9381ac8973ac34739bfa6b41/redash/query_runner/pg.py#L87).\r\n\r\n\r\nAccording the [psycopg2 docs](http://initd.org/psycopg/docs/module.html), you could use:\r\n```conn = psycopg2.connect(\"dbname=test user=postgres password=secret\")```\r\nor \r\n```conn = psycopg2.connect(database=\"test\", user=\"postgres\", password=\"secret\")```\r\nCurrently the first is being used.\r\n"},"comment":{"url":"https://api.github.com/repos/getredash/redash/issues/comments/219508383","html_url":"https://github.com/getredash/redash/issues/1056#issuecomment-219508383","issue_url":"https://api.github.com/repos/getredash/redash/issues/1056","id":219508383,"user":{"login":"jhollowayj","id":7515474,"avatar_url":"https://avatars.githubusercontent.com/u/7515474?v=3","gravatar_id":"","url":"https://api.github.com/users/jhollowayj","html_url":"https://github.com/jhollowayj","followers_url":"https://api.github.com/users/jhollowayj/followers","following_url":"https://api.github.com/users/jhollowayj/following{/other_user}","gists_url":"https://api.github.com/users/jhollowayj/gists{/gist_id}","starred_url":"https://api.github.com/users/jhollowayj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhollowayj/subscriptions","organizations_url":"https://api.github.com/users/jhollowayj/orgs","repos_url":"https://api.github.com/users/jhollowayj/repos","events_url":"https://api.github.com/users/jhollowayj/events{/privacy}","received_events_url":"https://api.github.com/users/jhollowayj/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T18:38:36Z","updated_at":"2016-05-16T18:38:36Z","body":"I tried to check things out by switching to a dictionary but I wasn't seeing the logs print out any more.  So I'm not sure what happened, but I've spent all the time I could on it today and ended up just changing the password. "}}