{"action":"opened","issue":{"url":"https://api.github.com/repos/go-gorp/gorp/issues/361","repository_url":"https://api.github.com/repos/go-gorp/gorp","labels_url":"https://api.github.com/repos/go-gorp/gorp/issues/361/labels{/name}","comments_url":"https://api.github.com/repos/go-gorp/gorp/issues/361/comments","events_url":"https://api.github.com/repos/go-gorp/gorp/issues/361/events","html_url":"https://github.com/go-gorp/gorp/issues/361","id":275043956,"number":361,"title":"Allow quoted Postgres fields to be lowercased","user":{"login":"aclindsa","id":362852,"avatar_url":"https://avatars3.githubusercontent.com/u/362852?v=4","gravatar_id":"","url":"https://api.github.com/users/aclindsa","html_url":"https://github.com/aclindsa","followers_url":"https://api.github.com/users/aclindsa/followers","following_url":"https://api.github.com/users/aclindsa/following{/other_user}","gists_url":"https://api.github.com/users/aclindsa/gists{/gist_id}","starred_url":"https://api.github.com/users/aclindsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aclindsa/subscriptions","organizations_url":"https://api.github.com/users/aclindsa/orgs","repos_url":"https://api.github.com/users/aclindsa/repos","events_url":"https://api.github.com/users/aclindsa/events{/privacy}","received_events_url":"https://api.github.com/users/aclindsa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-18T01:57:21Z","updated_at":"2017-11-18T01:57:21Z","closed_at":null,"author_association":"NONE","body":"The default behavior of the Postgres Dialect requires you to either not use field names containing uppercase characters, or always quote then in hand-written queries, since gorp now quotes them internally. See https://github.com/go-gorp/gorp/issues/192 for context of the current behavior.\r\n\r\nWhile I understand the desire of the current behavior, it is also annoying when attempting to support other databases using the same queries. If we allow gorp to lowercase the field names for Postgres when creating them internally, it allows me to be lazy about not also changing all my queries and struct tags for all other database dialects to always force lowercase.\r\n\r\nI've created https://github.com/go-gorp/gorp/pull/360 with my proposed solution, which preserves the existing behavior by default."}}
{"actor":{"display_login":"aclindsa"}}