{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/issues/697","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/issues/697/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/issues/697/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/issues/697/events","html_url":"https://github.com/puppetlabs/puppetlabs-postgresql/pull/697","id":107414508,"number":697,"title":"Quote the encoding when creating a database, fixes error with","user":{"login":"buzzdeee","id":8383396,"avatar_url":"https://avatars.githubusercontent.com/u/8383396?v=3","gravatar_id":"","url":"https://api.github.com/users/buzzdeee","html_url":"https://github.com/buzzdeee","followers_url":"https://api.github.com/users/buzzdeee/followers","following_url":"https://api.github.com/users/buzzdeee/following{/other_user}","gists_url":"https://api.github.com/users/buzzdeee/gists{/gist_id}","starred_url":"https://api.github.com/users/buzzdeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buzzdeee/subscriptions","organizations_url":"https://api.github.com/users/buzzdeee/orgs","repos_url":"https://api.github.com/users/buzzdeee/repos","events_url":"https://api.github.com/users/buzzdeee/events{/privacy}","received_events_url":"https://api.github.com/users/buzzdeee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-20T20:05:44Z","updated_at":"2015-10-13T08:49:08Z","closed_at":"2015-10-13T08:49:08Z","pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/pulls/697","html_url":"https://github.com/puppetlabs/puppetlabs-postgresql/pull/697","diff_url":"https://github.com/puppetlabs/puppetlabs-postgresql/pull/697.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-postgresql/pull/697.patch"},"body":"PostgreSQL 9.4.4 seen on OpenBSD 5.8-snapshot.\r\n\r\nWithout the quoting, I got error like the following, using the puppetdb module:\r\n\r\nDebug: Executing '/usr/local/bin/psql -d postgres -p 5432 -t -c \"CREATE DATABASE puppetdb WITH OWNER=_postgresql TEMPLATE=template0 ENCODING=UTF-8  \"'\r\nError: Error executing SQL; psql returned pid 29760 exit 1: 'ERROR:  syntax error at or near \"UTF\"\r\nLINE 1: ...b WITH OWNER=_postgresql TEMPLATE=template0 ENCODING=UTF-8\r\n                                                                ^\r\n'\r\nError: /Stage[main]/Puppetdb::Database::Postgresql/Postgresql::Server::Db[puppetdb]/Postgresql::Server::Database[puppetdb]/Postgresql_psql[Create db 'puppetdb']/\r\ncommand: change from notrun to CREATE DATABASE puppetdb WITH OWNER=_postgresql TEMPLATE=template0 ENCODING=UTF-8   failed: Error executing SQL; psql returned pid\r\n 29760 exit 1: 'ERROR:  syntax error at or near \"UTF\"\r\nLINE 1: ...b WITH OWNER=_postgresql TEMPLATE=template0 ENCODING=UTF-8"},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/issues/comments/147650657","html_url":"https://github.com/puppetlabs/puppetlabs-postgresql/pull/697#issuecomment-147650657","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-postgresql/issues/697","id":147650657,"user":{"login":"DavidS","id":27712,"avatar_url":"https://avatars.githubusercontent.com/u/27712?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidS","html_url":"https://github.com/DavidS","followers_url":"https://api.github.com/users/DavidS/followers","following_url":"https://api.github.com/users/DavidS/following{/other_user}","gists_url":"https://api.github.com/users/DavidS/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidS/subscriptions","organizations_url":"https://api.github.com/users/DavidS/orgs","repos_url":"https://api.github.com/users/DavidS/repos","events_url":"https://api.github.com/users/DavidS/events{/privacy}","received_events_url":"https://api.github.com/users/DavidS/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T08:49:08Z","updated_at":"2015-10-13T08:49:08Z","body":"I already merged that as #700 "}}