{"action":"closed","number":541,"pull_request":{"url":"https://api.github.com/repos/coleifer/peewee/pulls/541","id":30426300,"html_url":"https://github.com/coleifer/peewee/pull/541","diff_url":"https://github.com/coleifer/peewee/pull/541.diff","patch_url":"https://github.com/coleifer/peewee/pull/541.patch","issue_url":"https://api.github.com/repos/coleifer/peewee/issues/541","number":541,"state":"closed","locked":false,"title":"In PostgresqlExtDatabase, respect the 'autorollback' option","user":{"login":"davidmcclure","id":814168,"avatar_url":"https://avatars.githubusercontent.com/u/814168?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmcclure","html_url":"https://github.com/davidmcclure","followers_url":"https://api.github.com/users/davidmcclure/followers","following_url":"https://api.github.com/users/davidmcclure/following{/other_user}","gists_url":"https://api.github.com/users/davidmcclure/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmcclure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmcclure/subscriptions","organizations_url":"https://api.github.com/users/davidmcclure/orgs","repos_url":"https://api.github.com/users/davidmcclure/repos","events_url":"https://api.github.com/users/davidmcclure/events{/privacy}","received_events_url":"https://api.github.com/users/davidmcclure/received_events","type":"User","site_admin":false},"body":"First of all, thanks so much for Peewee! I ran across the problem described in #240, which was fixed by the addition of the `autorollback` database option.\r\n\r\nI was setting `autorollback=True`, but still hitting the problem, and realized that the implementation of `execute_sql ` in `PostgresqlExtDatabase` (which I'm using) doesn't include the check to see if the transaction should be automatically rolled back if the query throws an exception. I just copied in the two lines from the parent `Database` class that do this.","created_at":"2015-03-04T00:07:02Z","updated_at":"2015-03-04T00:53:10Z","closed_at":"2015-03-04T00:53:10Z","merged_at":"2015-03-04T00:53:10Z","merge_commit_sha":"1504087e89e47ce9295775aa4bda08f011acccbb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coleifer/peewee/pulls/541/commits","review_comments_url":"https://api.github.com/repos/coleifer/peewee/pulls/541/comments","review_comment_url":"https://api.github.com/repos/coleifer/peewee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coleifer/peewee/issues/541/comments","statuses_url":"https://api.github.com/repos/coleifer/peewee/statuses/713c434a1f1acd5e616053ff99ffa5b9e5ff9925","head":{"label":"davidmcclure:bug/postgres-ext-autorollback","ref":"bug/postgres-ext-autorollback","sha":"713c434a1f1acd5e616053ff99ffa5b9e5ff9925","user":{"login":"davidmcclure","id":814168,"avatar_url":"https://avatars.githubusercontent.com/u/814168?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmcclure","html_url":"https://github.com/davidmcclure","followers_url":"https://api.github.com/users/davidmcclure/followers","following_url":"https://api.github.com/users/davidmcclure/following{/other_user}","gists_url":"https://api.github.com/users/davidmcclure/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmcclure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmcclure/subscriptions","organizations_url":"https://api.github.com/users/davidmcclure/orgs","repos_url":"https://api.github.com/users/davidmcclure/repos","events_url":"https://api.github.com/users/davidmcclure/events{/privacy}","received_events_url":"https://api.github.com/users/davidmcclure/received_events","type":"User","site_admin":false},"repo":{"id":31628101,"name":"peewee","full_name":"davidmcclure/peewee","owner":{"login":"davidmcclure","id":814168,"avatar_url":"https://avatars.githubusercontent.com/u/814168?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmcclure","html_url":"https://github.com/davidmcclure","followers_url":"https://api.github.com/users/davidmcclure/followers","following_url":"https://api.github.com/users/davidmcclure/following{/other_user}","gists_url":"https://api.github.com/users/davidmcclure/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmcclure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmcclure/subscriptions","organizations_url":"https://api.github.com/users/davidmcclure/orgs","repos_url":"https://api.github.com/users/davidmcclure/repos","events_url":"https://api.github.com/users/davidmcclure/events{/privacy}","received_events_url":"https://api.github.com/users/davidmcclure/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidmcclure/peewee","description":"a small, expressive orm -- supports postgresql, mysql and sqlite","fork":true,"url":"https://api.github.com/repos/davidmcclure/peewee","forks_url":"https://api.github.com/repos/davidmcclure/peewee/forks","keys_url":"https://api.github.com/repos/davidmcclure/peewee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidmcclure/peewee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidmcclure/peewee/teams","hooks_url":"https://api.github.com/repos/davidmcclure/peewee/hooks","issue_events_url":"https://api.github.com/repos/davidmcclure/peewee/issues/events{/number}","events_url":"https://api.github.com/repos/davidmcclure/peewee/events","assignees_url":"https://api.github.com/repos/davidmcclure/peewee/assignees{/user}","branches_url":"https://api.github.com/repos/davidmcclure/peewee/branches{/branch}","tags_url":"https://api.github.com/repos/davidmcclure/peewee/tags","blobs_url":"https://api.github.com/repos/davidmcclure/peewee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidmcclure/peewee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidmcclure/peewee/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidmcclure/peewee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidmcclure/peewee/statuses/{sha}","languages_url":"https://api.github.com/repos/davidmcclure/peewee/languages","stargazers_url":"https://api.github.com/repos/davidmcclure/peewee/stargazers","contributors_url":"https://api.github.com/repos/davidmcclure/peewee/contributors","subscribers_url":"https://api.github.com/repos/davidmcclure/peewee/subscribers","subscription_url":"https://api.github.com/repos/davidmcclure/peewee/subscription","commits_url":"https://api.github.com/repos/davidmcclure/peewee/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidmcclure/peewee/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidmcclure/peewee/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidmcclure/peewee/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidmcclure/peewee/contents/{+path}","compare_url":"https://api.github.com/repos/davidmcclure/peewee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidmcclure/peewee/merges","archive_url":"https://api.github.com/repos/davidmcclure/peewee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidmcclure/peewee/downloads","issues_url":"https://api.github.com/repos/davidmcclure/peewee/issues{/number}","pulls_url":"https://api.github.com/repos/davidmcclure/peewee/pulls{/number}","milestones_url":"https://api.github.com/repos/davidmcclure/peewee/milestones{/number}","notifications_url":"https://api.github.com/repos/davidmcclure/peewee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidmcclure/peewee/labels{/name}","releases_url":"https://api.github.com/repos/davidmcclure/peewee/releases{/id}","created_at":"2015-03-03T23:55:07Z","updated_at":"2015-03-03T23:55:08Z","pushed_at":"2015-03-03T23:58:09Z","git_url":"git://github.com/davidmcclure/peewee.git","ssh_url":"git@github.com:davidmcclure/peewee.git","clone_url":"https://github.com/davidmcclure/peewee.git","svn_url":"https://github.com/davidmcclure/peewee","homepage":"http://docs.peewee-orm.com/","size":10163,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coleifer:master","ref":"master","sha":"ab815a6f6d1077b92c6f0b991ed3a986cca625ca","user":{"login":"coleifer","id":119974,"avatar_url":"https://avatars.githubusercontent.com/u/119974?v=3","gravatar_id":"","url":"https://api.github.com/users/coleifer","html_url":"https://github.com/coleifer","followers_url":"https://api.github.com/users/coleifer/followers","following_url":"https://api.github.com/users/coleifer/following{/other_user}","gists_url":"https://api.github.com/users/coleifer/gists{/gist_id}","starred_url":"https://api.github.com/users/coleifer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coleifer/subscriptions","organizations_url":"https://api.github.com/users/coleifer/orgs","repos_url":"https://api.github.com/users/coleifer/repos","events_url":"https://api.github.com/users/coleifer/events{/privacy}","received_events_url":"https://api.github.com/users/coleifer/received_events","type":"User","site_admin":false},"repo":{"id":979480,"name":"peewee","full_name":"coleifer/peewee","owner":{"login":"coleifer","id":119974,"avatar_url":"https://avatars.githubusercontent.com/u/119974?v=3","gravatar_id":"","url":"https://api.github.com/users/coleifer","html_url":"https://github.com/coleifer","followers_url":"https://api.github.com/users/coleifer/followers","following_url":"https://api.github.com/users/coleifer/following{/other_user}","gists_url":"https://api.github.com/users/coleifer/gists{/gist_id}","starred_url":"https://api.github.com/users/coleifer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coleifer/subscriptions","organizations_url":"https://api.github.com/users/coleifer/orgs","repos_url":"https://api.github.com/users/coleifer/repos","events_url":"https://api.github.com/users/coleifer/events{/privacy}","received_events_url":"https://api.github.com/users/coleifer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/coleifer/peewee","description":"a small, expressive orm -- supports postgresql, mysql and sqlite","fork":false,"url":"https://api.github.com/repos/coleifer/peewee","forks_url":"https://api.github.com/repos/coleifer/peewee/forks","keys_url":"https://api.github.com/repos/coleifer/peewee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coleifer/peewee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coleifer/peewee/teams","hooks_url":"https://api.github.com/repos/coleifer/peewee/hooks","issue_events_url":"https://api.github.com/repos/coleifer/peewee/issues/events{/number}","events_url":"https://api.github.com/repos/coleifer/peewee/events","assignees_url":"https://api.github.com/repos/coleifer/peewee/assignees{/user}","branches_url":"https://api.github.com/repos/coleifer/peewee/branches{/branch}","tags_url":"https://api.github.com/repos/coleifer/peewee/tags","blobs_url":"https://api.github.com/repos/coleifer/peewee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coleifer/peewee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coleifer/peewee/git/refs{/sha}","trees_url":"https://api.github.com/repos/coleifer/peewee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coleifer/peewee/statuses/{sha}","languages_url":"https://api.github.com/repos/coleifer/peewee/languages","stargazers_url":"https://api.github.com/repos/coleifer/peewee/stargazers","contributors_url":"https://api.github.com/repos/coleifer/peewee/contributors","subscribers_url":"https://api.github.com/repos/coleifer/peewee/subscribers","subscription_url":"https://api.github.com/repos/coleifer/peewee/subscription","commits_url":"https://api.github.com/repos/coleifer/peewee/commits{/sha}","git_commits_url":"https://api.github.com/repos/coleifer/peewee/git/commits{/sha}","comments_url":"https://api.github.com/repos/coleifer/peewee/comments{/number}","issue_comment_url":"https://api.github.com/repos/coleifer/peewee/issues/comments{/number}","contents_url":"https://api.github.com/repos/coleifer/peewee/contents/{+path}","compare_url":"https://api.github.com/repos/coleifer/peewee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coleifer/peewee/merges","archive_url":"https://api.github.com/repos/coleifer/peewee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coleifer/peewee/downloads","issues_url":"https://api.github.com/repos/coleifer/peewee/issues{/number}","pulls_url":"https://api.github.com/repos/coleifer/peewee/pulls{/number}","milestones_url":"https://api.github.com/repos/coleifer/peewee/milestones{/number}","notifications_url":"https://api.github.com/repos/coleifer/peewee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coleifer/peewee/labels{/name}","releases_url":"https://api.github.com/repos/coleifer/peewee/releases{/id}","created_at":"2010-10-11T20:14:11Z","updated_at":"2015-03-03T20:56:27Z","pushed_at":"2015-03-04T00:53:11Z","git_url":"git://github.com/coleifer/peewee.git","ssh_url":"git@github.com:coleifer/peewee.git","clone_url":"https://github.com/coleifer/peewee.git","svn_url":"https://github.com/coleifer/peewee","homepage":"http://docs.peewee-orm.com/","size":10163,"stargazers_count":1737,"watchers_count":1737,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":247,"mirror_url":null,"open_issues_count":2,"forks":247,"open_issues":2,"watchers":1737,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coleifer/peewee/pulls/541"},"html":{"href":"https://github.com/coleifer/peewee/pull/541"},"issue":{"href":"https://api.github.com/repos/coleifer/peewee/issues/541"},"comments":{"href":"https://api.github.com/repos/coleifer/peewee/issues/541/comments"},"review_comments":{"href":"https://api.github.com/repos/coleifer/peewee/pulls/541/comments"},"review_comment":{"href":"https://api.github.com/repos/coleifer/peewee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coleifer/peewee/pulls/541/commits"},"statuses":{"href":"https://api.github.com/repos/coleifer/peewee/statuses/713c434a1f1acd5e616053ff99ffa5b9e5ff9925"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"coleifer","id":119974,"avatar_url":"https://avatars.githubusercontent.com/u/119974?v=3","gravatar_id":"","url":"https://api.github.com/users/coleifer","html_url":"https://github.com/coleifer","followers_url":"https://api.github.com/users/coleifer/followers","following_url":"https://api.github.com/users/coleifer/following{/other_user}","gists_url":"https://api.github.com/users/coleifer/gists{/gist_id}","starred_url":"https://api.github.com/users/coleifer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coleifer/subscriptions","organizations_url":"https://api.github.com/users/coleifer/orgs","repos_url":"https://api.github.com/users/coleifer/repos","events_url":"https://api.github.com/users/coleifer/events{/privacy}","received_events_url":"https://api.github.com/users/coleifer/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":1}}