{"action":"created","issue":{"url":"https://api.github.com/repos/dbcli/pgcli/issues/211","labels_url":"https://api.github.com/repos/dbcli/pgcli/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/dbcli/pgcli/issues/211/comments","events_url":"https://api.github.com/repos/dbcli/pgcli/issues/211/events","html_url":"https://github.com/dbcli/pgcli/issues/211","id":69347338,"number":211,"title":"SELECT … INTO new_table should update list of available tables","user":{"login":"drocco007","id":1424858,"avatar_url":"https://avatars.githubusercontent.com/u/1424858?v=3","gravatar_id":"","url":"https://api.github.com/users/drocco007","html_url":"https://github.com/drocco007","followers_url":"https://api.github.com/users/drocco007/followers","following_url":"https://api.github.com/users/drocco007/following{/other_user}","gists_url":"https://api.github.com/users/drocco007/gists{/gist_id}","starred_url":"https://api.github.com/users/drocco007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drocco007/subscriptions","organizations_url":"https://api.github.com/users/drocco007/orgs","repos_url":"https://api.github.com/users/drocco007/repos","events_url":"https://api.github.com/users/drocco007/events{/privacy}","received_events_url":"https://api.github.com/users/drocco007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-18T21:04:56Z","updated_at":"2015-04-29T02:00:06Z","closed_at":null,"body":"In this screenshot, my_new_table does not appear in the list of table suggestions:\r\n\r\n![select_into_no_refresh](https://cloud.githubusercontent.com/assets/1424858/7217263/d5cfc39c-e5ec-11e4-8178-b6a460e35267.png)\r\n"},"comment":{"url":"https://api.github.com/repos/dbcli/pgcli/issues/comments/97282835","html_url":"https://github.com/dbcli/pgcli/issues/211#issuecomment-97282835","issue_url":"https://api.github.com/repos/dbcli/pgcli/issues/211","id":97282835,"user":{"login":"j-bennet","id":637013,"avatar_url":"https://avatars.githubusercontent.com/u/637013?v=3","gravatar_id":"","url":"https://api.github.com/users/j-bennet","html_url":"https://github.com/j-bennet","followers_url":"https://api.github.com/users/j-bennet/followers","following_url":"https://api.github.com/users/j-bennet/following{/other_user}","gists_url":"https://api.github.com/users/j-bennet/gists{/gist_id}","starred_url":"https://api.github.com/users/j-bennet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-bennet/subscriptions","organizations_url":"https://api.github.com/users/j-bennet/orgs","repos_url":"https://api.github.com/users/j-bennet/repos","events_url":"https://api.github.com/users/j-bennet/events{/privacy}","received_events_url":"https://api.github.com/users/j-bennet/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T02:00:06Z","updated_at":"2015-04-29T02:00:06Z","body":"I like the idea of an inexpensive query to find out table count. I think even finding table column counts may not end up to be a \"heavy\" query. Something like this:\r\n\r\nselect t.table_name, count(c.column_name) as column_count\r\nfrom information_schema.tables t\r\njoin information_schema.columns c on c.table_name = t.table_name\r\nwhere t.table_schema = 'public' group by t.table_name;\r\n\r\nEspecially if it's only run after an \"ALTER\" statement. Yes, it is possible to do \"SELECT my_function_that_alters_a_table()\", but I think this would be a very edgy edge case and maybe it's ok if we don't detect it."}}