{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2072","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2072/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2072/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2072/events","html_url":"https://github.com/cockroachdb/cockroach/pull/2072","id":100603359,"number":2072,"title":"Rework privilege storage.","user":{"login":"MBerhault","id":5901480,"avatar_url":"https://avatars.githubusercontent.com/u/5901480?v=3","gravatar_id":"","url":"https://api.github.com/users/MBerhault","html_url":"https://github.com/MBerhault","followers_url":"https://api.github.com/users/MBerhault/followers","following_url":"https://api.github.com/users/MBerhault/following{/other_user}","gists_url":"https://api.github.com/users/MBerhault/gists{/gist_id}","starred_url":"https://api.github.com/users/MBerhault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MBerhault/subscriptions","organizations_url":"https://api.github.com/users/MBerhault/orgs","repos_url":"https://api.github.com/users/MBerhault/repos","events_url":"https://api.github.com/users/MBerhault/events{/privacy}","received_events_url":"https://api.github.com/users/MBerhault/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/PTAL","name":"PTAL","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-12T18:17:37Z","updated_at":"2015-08-14T16:55:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/2072","html_url":"https://github.com/cockroachdb/cockroach/pull/2072","diff_url":"https://github.com/cockroachdb/cockroach/pull/2072.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/2072.patch"},"body":"Work towards #2005.\r\n\r\nCredentials are now stored as a sorted list of {user, privilegeBitField}\r\nThe ALL logic makes grant/revoke a bit twisted, but is probably the most\r\nexpected behavior.\r\n\r\nGRANT, REVOKE, and SHOW GRANTS are finalized.\r\n\r\nThe final step will be to fix all the CheckPrivilege calls to use the proper\r\nprivilege and finally remove READ,WRITE."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/131179223","html_url":"https://github.com/cockroachdb/cockroach/pull/2072#issuecomment-131179223","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2072","id":131179223,"user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars.githubusercontent.com/u/6201335?v=3","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T16:55:46Z","updated_at":"2015-08-14T16:55:46Z","body":"If it isn't too much work (and in this case, it is already done), the parser should create a syntax tree which can generate the parsed statement. That is, it should preserve order. While we don't perfectly adhere to this guideline right now, this is what other syntax trees do and is the advice I've received from folks who have written parsers before."}}