{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/852","repository_url":"https://api.github.com/repos/tgriesser/knex","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/852/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/852/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/852/events","html_url":"https://github.com/tgriesser/knex/issues/852","id":82672780,"number":852,"title":"SSL Query Parameter for Postgres","user":{"login":"gregbty","id":680484,"avatar_url":"https://avatars.githubusercontent.com/u/680484?v=3","gravatar_id":"","url":"https://api.github.com/users/gregbty","html_url":"https://github.com/gregbty","followers_url":"https://api.github.com/users/gregbty/followers","following_url":"https://api.github.com/users/gregbty/following{/other_user}","gists_url":"https://api.github.com/users/gregbty/gists{/gist_id}","starred_url":"https://api.github.com/users/gregbty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregbty/subscriptions","organizations_url":"https://api.github.com/users/gregbty/orgs","repos_url":"https://api.github.com/users/gregbty/repos","events_url":"https://api.github.com/users/gregbty/events{/privacy}","received_events_url":"https://api.github.com/users/gregbty/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tgriesser/knex/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/tgriesser/knex/labels/PR%20please","name":"PR please","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2015-05-30T02:46:27Z","updated_at":"2016-06-29T22:01:50Z","closed_at":null,"body":"It seems like #516 has surfaced again. When I use a config object it seems to work fine with the `ssl` option, however this doesn't work with a connection string:\r\n\r\nWorks:\r\n```node\r\nconnection: {\r\n  host: \"host\",\r\n  port: \"port\",\r\n  user: \"user\",\r\n  password: \"password\",\r\n  database: \"database\",\r\n  ssl: true\r\n }\r\n```\r\n\r\nDoes not work:\r\n```node\r\nconnection: \"postgres://user:password@host:port/database?ssl=true\"\r\n```"},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/229502678","html_url":"https://github.com/tgriesser/knex/issues/852#issuecomment-229502678","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/852","id":229502678,"user":{"login":"bennmapes","id":1332575,"avatar_url":"https://avatars.githubusercontent.com/u/1332575?v=3","gravatar_id":"","url":"https://api.github.com/users/bennmapes","html_url":"https://github.com/bennmapes","followers_url":"https://api.github.com/users/bennmapes/followers","following_url":"https://api.github.com/users/bennmapes/following{/other_user}","gists_url":"https://api.github.com/users/bennmapes/gists{/gist_id}","starred_url":"https://api.github.com/users/bennmapes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennmapes/subscriptions","organizations_url":"https://api.github.com/users/bennmapes/orgs","repos_url":"https://api.github.com/users/bennmapes/repos","events_url":"https://api.github.com/users/bennmapes/events{/privacy}","received_events_url":"https://api.github.com/users/bennmapes/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T22:01:49Z","updated_at":"2016-06-29T22:01:49Z","body":"I had the same issue, it appears the knex doesn't set the ssl default in `pg`.\r\n\r\nI was able to fix this by adding \r\n`var pg = require('pg');\r\npg.defaults.ssl = true;`\r\n\r\nbefore using knex."}}
{"actor":{"display_login":"bennmapes"}}