{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10091","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10091/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10091/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10091/events","html_url":"https://github.com/cockroachdb/cockroach/pull/10091","id":184045345,"number":10091,"title":"sql: allow manipulating unqualified index names.","user":{"login":"knz","id":642886,"avatar_url":"https://avatars.githubusercontent.com/u/642886?v=3","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mjibson","id":41181,"avatar_url":"https://avatars.githubusercontent.com/u/41181?v=3","gravatar_id":"","url":"https://api.github.com/users/mjibson","html_url":"https://github.com/mjibson","followers_url":"https://api.github.com/users/mjibson/followers","following_url":"https://api.github.com/users/mjibson/following{/other_user}","gists_url":"https://api.github.com/users/mjibson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjibson/subscriptions","organizations_url":"https://api.github.com/users/mjibson/orgs","repos_url":"https://api.github.com/users/mjibson/repos","events_url":"https://api.github.com/users/mjibson/events{/privacy}","received_events_url":"https://api.github.com/users/mjibson/received_events","type":"User","site_admin":false},"assignees":[{"login":"mjibson","id":41181,"avatar_url":"https://avatars.githubusercontent.com/u/41181?v=3","gravatar_id":"","url":"https://api.github.com/users/mjibson","html_url":"https://github.com/mjibson","followers_url":"https://api.github.com/users/mjibson/followers","following_url":"https://api.github.com/users/mjibson/following{/other_user}","gists_url":"https://api.github.com/users/mjibson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjibson/subscriptions","organizations_url":"https://api.github.com/users/mjibson/orgs","repos_url":"https://api.github.com/users/mjibson/repos","events_url":"https://api.github.com/users/mjibson/events{/privacy}","received_events_url":"https://api.github.com/users/mjibson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-10-19T18:55:51Z","updated_at":"2016-10-21T10:24:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/10091","html_url":"https://github.com/cockroachdb/cockroach/pull/10091","diff_url":"https://github.com/cockroachdb/cockroach/pull/10091.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/10091.patch"},"body":"With this patch, one can use a simple index name \"idxname\" instead of\r\n\"tablename@idxname\" with DROP INDEX and ALTER INDEX.\r\n\r\nFixes #8800.\r\n\r\ncc @dt\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/10091)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/255347423","html_url":"https://github.com/cockroachdb/cockroach/pull/10091#issuecomment-255347423","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/10091","id":255347423,"user":{"login":"knz","id":642886,"avatar_url":"https://avatars.githubusercontent.com/u/642886?v=3","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T10:24:58Z","updated_at":"2016-10-21T10:24:58Z","body":"\n\n\n\nReview status: 0 of 11 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.\n\n---\n\n*[pkg/sql/split.go, line 53 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/10091#-KUTYYbWVIe_MwoXghya:-KUakkakA3Varwo28jN_:bfy3vxx) ([raw file](https://github.com/cockroachdb/cockroach/blob/b18b5e7cf3617b641d27de16293cac6faef52fe2/pkg/sql/split.go#L53)):*\n<details><summary><i>Previously, mjibson (Matt Jibson) wrote…</i></summary>\n> Why do we need the check for n.Index != nil here?\n> \n> Also this if block is repeated almost verbatim (except for this n.Index check) in three places. Can we make a method on `n` to correctly set tn and n.Index?\n</details>\nThe check for n.Index is because this node is used for both ALTER TABLE ... SPLIT AT and ALTER INDEX ... SPLIT AT.\n\nBut I refactored the code as suggested.\n\n---\n\n*[pkg/sql/parser/sql.y, line 4391 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/10091#-KUTXLbrQYmwnz8zWa_A:-KUakp0fe4pLkHmI8-JQ:bctvdcg) ([raw file](https://github.com/cockroachdb/cockroach/blob/b18b5e7cf3617b641d27de16293cac6faef52fe2/pkg/sql/parser/sql.y#L4391)):*\n<details><summary><i>Previously, mjibson (Matt Jibson) wrote…</i></summary>\n> Why not `name`?\n</details>\nBecause if I don't have a current database in the planner I still want to do e.g. \"DROP INDEX mydb.myindex\".\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/10091)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"knz"}}