{"action":"created","comment":{"url":"https://api.github.com/repos/crate/crash/pulls/comments/85943958","pull_request_review_id":6627233,"id":85943958,"diff_hunk":"@@ -238,9 +239,15 @@ def exit(self):\n     @noargs_command\n     def _show_tables(self, *args):\n         \"\"\" print the existing tables within the 'doc' schema \"\"\"\n-        self._exec(\"\"\"select format('%s.%s', schema_name, table_name) as name\n-                      from information_schema.tables\n-                      where schema_name not in ('sys','information_schema', 'pg_catalog')\"\"\")\n+        if self.connection.lowest_server_version >= TABLE_SCHEMA_MIN_VERSION:\n+            self._exec(\"\"\"select format('%s.%s', table_schema, table_name) as name\n+                          from information_schema.tables\n+                          where table_schema not in ('sys','information_schema', 'pg_catalog')\"\"\")\n+        else:\n+            self._exec(\"\"\"select format('%s.%s', schema_name, table_name) as name\n+                          from information_schema.tables\n+                          where schema_name not in ('sys','information_schema', 'pg_catalog')\"\"\")","path":"src/crate/crash/command.py","position":22,"original_position":22,"commit_id":"9d68f5315eef94e3434454c1cca4f1e0649e121e","original_commit_id":"9d68f5315eef94e3434454c1cca4f1e0649e121e","user":{"login":"bogensberger","id":1038966,"avatar_url":"https://avatars.githubusercontent.com/u/1038966?v=3","gravatar_id":"","url":"https://api.github.com/users/bogensberger","html_url":"https://github.com/bogensberger","followers_url":"https://api.github.com/users/bogensberger/followers","following_url":"https://api.github.com/users/bogensberger/following{/other_user}","gists_url":"https://api.github.com/users/bogensberger/gists{/gist_id}","starred_url":"https://api.github.com/users/bogensberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogensberger/subscriptions","organizations_url":"https://api.github.com/users/bogensberger/orgs","repos_url":"https://api.github.com/users/bogensberger/repos","events_url":"https://api.github.com/users/bogensberger/events{/privacy}","received_events_url":"https://api.github.com/users/bogensberger/received_events","type":"User","site_admin":false},"body":"```\"\"\"select format('%s.%s', {schema}, table_name) as name ...\"\"\".format(schema=\"table_schema\" if self.connection.lowerst_server_version >=  TABLE_SCHEMA_MIN_VERSION else \"schema_name\")```\r\nshould do the job without repeating the query\r\n\r\n","created_at":"2016-11-01T14:52:35Z","updated_at":"2016-11-01T14:54:14Z","html_url":"https://github.com/crate/crash/pull/152#discussion_r85943958","pull_request_url":"https://api.github.com/repos/crate/crash/pulls/152","_links":{"self":{"href":"https://api.github.com/repos/crate/crash/pulls/comments/85943958"},"html":{"href":"https://github.com/crate/crash/pull/152#discussion_r85943958"},"pull_request":{"href":"https://api.github.com/repos/crate/crash/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/crate/crash/pulls/152","id":88588658,"html_url":"https://github.com/crate/crash/pull/152","diff_url":"https://github.com/crate/crash/pull/152.diff","patch_url":"https://github.com/crate/crash/pull/152.patch","issue_url":"https://api.github.com/repos/crate/crash/issues/152","number":152,"state":"open","locked":false,"title":"use column table_schema instead of schema_name","user":{"login":"jodok","id":158125,"avatar_url":"https://avatars.githubusercontent.com/u/158125?v=3","gravatar_id":"","url":"https://api.github.com/users/jodok","html_url":"https://github.com/jodok","followers_url":"https://api.github.com/users/jodok/followers","following_url":"https://api.github.com/users/jodok/following{/other_user}","gists_url":"https://api.github.com/users/jodok/gists{/gist_id}","starred_url":"https://api.github.com/users/jodok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodok/subscriptions","organizations_url":"https://api.github.com/users/jodok/orgs","repos_url":"https://api.github.com/users/jodok/repos","events_url":"https://api.github.com/users/jodok/events{/privacy}","received_events_url":"https://api.github.com/users/jodok/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-09T17:57:20Z","updated_at":"2016-11-01T14:54:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac1921a2216aa6da4b6d9bd355099c7a43b1acc6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/crate/crash/pulls/152/commits","review_comments_url":"https://api.github.com/repos/crate/crash/pulls/152/comments","review_comment_url":"https://api.github.com/repos/crate/crash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crate/crash/issues/152/comments","statuses_url":"https://api.github.com/repos/crate/crash/statuses/9d68f5315eef94e3434454c1cca4f1e0649e121e","head":{"label":"crate:jb/rename_schema_name","ref":"jb/rename_schema_name","sha":"9d68f5315eef94e3434454c1cca4f1e0649e121e","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":17720373,"name":"crash","full_name":"crate/crash","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crash","description":"The CRate SHell","fork":false,"url":"https://api.github.com/repos/crate/crash","forks_url":"https://api.github.com/repos/crate/crash/forks","keys_url":"https://api.github.com/repos/crate/crash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crash/teams","hooks_url":"https://api.github.com/repos/crate/crash/hooks","issue_events_url":"https://api.github.com/repos/crate/crash/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crash/events","assignees_url":"https://api.github.com/repos/crate/crash/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crash/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crash/tags","blobs_url":"https://api.github.com/repos/crate/crash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crash/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crash/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crash/languages","stargazers_url":"https://api.github.com/repos/crate/crash/stargazers","contributors_url":"https://api.github.com/repos/crate/crash/contributors","subscribers_url":"https://api.github.com/repos/crate/crash/subscribers","subscription_url":"https://api.github.com/repos/crate/crash/subscription","commits_url":"https://api.github.com/repos/crate/crash/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crash/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crash/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crash/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crash/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crash/merges","archive_url":"https://api.github.com/repos/crate/crash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crash/downloads","issues_url":"https://api.github.com/repos/crate/crash/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crash/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crash/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crash/labels{/name}","releases_url":"https://api.github.com/repos/crate/crash/releases{/id}","deployments_url":"https://api.github.com/repos/crate/crash/deployments","created_at":"2014-03-13T17:52:39Z","updated_at":"2016-10-27T08:32:42Z","pushed_at":"2016-11-01T14:33:45Z","git_url":"git://github.com/crate/crash.git","ssh_url":"git@github.com:crate/crash.git","clone_url":"https://github.com/crate/crash.git","svn_url":"https://github.com/crate/crash","homepage":null,"size":445,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":12,"default_branch":"master"}},"base":{"label":"crate:master","ref":"master","sha":"74344ed21aaaedb275930ec109b23d370c6dd5ee","user":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"repo":{"id":17720373,"name":"crash","full_name":"crate/crash","owner":{"login":"crate","id":4048232,"avatar_url":"https://avatars.githubusercontent.com/u/4048232?v=3","gravatar_id":"","url":"https://api.github.com/users/crate","html_url":"https://github.com/crate","followers_url":"https://api.github.com/users/crate/followers","following_url":"https://api.github.com/users/crate/following{/other_user}","gists_url":"https://api.github.com/users/crate/gists{/gist_id}","starred_url":"https://api.github.com/users/crate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crate/subscriptions","organizations_url":"https://api.github.com/users/crate/orgs","repos_url":"https://api.github.com/users/crate/repos","events_url":"https://api.github.com/users/crate/events{/privacy}","received_events_url":"https://api.github.com/users/crate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crate/crash","description":"The CRate SHell","fork":false,"url":"https://api.github.com/repos/crate/crash","forks_url":"https://api.github.com/repos/crate/crash/forks","keys_url":"https://api.github.com/repos/crate/crash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crate/crash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crate/crash/teams","hooks_url":"https://api.github.com/repos/crate/crash/hooks","issue_events_url":"https://api.github.com/repos/crate/crash/issues/events{/number}","events_url":"https://api.github.com/repos/crate/crash/events","assignees_url":"https://api.github.com/repos/crate/crash/assignees{/user}","branches_url":"https://api.github.com/repos/crate/crash/branches{/branch}","tags_url":"https://api.github.com/repos/crate/crash/tags","blobs_url":"https://api.github.com/repos/crate/crash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crate/crash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crate/crash/git/refs{/sha}","trees_url":"https://api.github.com/repos/crate/crash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crate/crash/statuses/{sha}","languages_url":"https://api.github.com/repos/crate/crash/languages","stargazers_url":"https://api.github.com/repos/crate/crash/stargazers","contributors_url":"https://api.github.com/repos/crate/crash/contributors","subscribers_url":"https://api.github.com/repos/crate/crash/subscribers","subscription_url":"https://api.github.com/repos/crate/crash/subscription","commits_url":"https://api.github.com/repos/crate/crash/commits{/sha}","git_commits_url":"https://api.github.com/repos/crate/crash/git/commits{/sha}","comments_url":"https://api.github.com/repos/crate/crash/comments{/number}","issue_comment_url":"https://api.github.com/repos/crate/crash/issues/comments{/number}","contents_url":"https://api.github.com/repos/crate/crash/contents/{+path}","compare_url":"https://api.github.com/repos/crate/crash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crate/crash/merges","archive_url":"https://api.github.com/repos/crate/crash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crate/crash/downloads","issues_url":"https://api.github.com/repos/crate/crash/issues{/number}","pulls_url":"https://api.github.com/repos/crate/crash/pulls{/number}","milestones_url":"https://api.github.com/repos/crate/crash/milestones{/number}","notifications_url":"https://api.github.com/repos/crate/crash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crate/crash/labels{/name}","releases_url":"https://api.github.com/repos/crate/crash/releases{/id}","deployments_url":"https://api.github.com/repos/crate/crash/deployments","created_at":"2014-03-13T17:52:39Z","updated_at":"2016-10-27T08:32:42Z","pushed_at":"2016-11-01T14:33:45Z","git_url":"git://github.com/crate/crash.git","ssh_url":"git@github.com:crate/crash.git","clone_url":"https://github.com/crate/crash.git","svn_url":"https://github.com/crate/crash","homepage":null,"size":445,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crate/crash/pulls/152"},"html":{"href":"https://github.com/crate/crash/pull/152"},"issue":{"href":"https://api.github.com/repos/crate/crash/issues/152"},"comments":{"href":"https://api.github.com/repos/crate/crash/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/crate/crash/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/crate/crash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crate/crash/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/crate/crash/statuses/9d68f5315eef94e3434454c1cca4f1e0649e121e"}}}}
{"actor":{"display_login":"bogensberger"}}