Menu

#189 Generated grant statements could be improved

open
nobody
None
5
2012-10-20
2010-10-01
Pierre Y.
No

The "Grant and Revoke Privileges" tool cannot generate grant statement to multiple users at the same time.

1/ Open a table
2/ Click "Privileges"
3/ Click "Grant and revoke privileges"
4/ Choose any grant or revoke action
5/ Choose any database object and any kind of grant type (a table "MY_TABLE" and "ALL" for the sake of the example)
6/ Type "USER_A, USER_B" in User/Role

The generated SQL is :

GRANT ALL ON MY_TABLE TO "USER_A, USER_B"

instead of :

GRANT ALL ON MY_TABLE TO USER_A, USER_B

When you execute the generated example, you will grant all privileges to "USER_A, USER_B" instead of granting all privileges to USER_A and USER_B.

Maybe detecting a comma in the user name can help to improve the generated SQL statement ?

Discussion

  • Nando Dessena

    Nando Dessena - 2010-10-01

    I don't think detecting the comma is viable, as delimited identifiers can contain pretty much everything including a comma. Or maybe user names are never delimited?

    Have you tried typing "USER_A", "USER_B" instead?

     
  • Nobody/Anonymous

    khD0nl geoocotcgczq, [url=http://jybsxykuzjex.com/]jybsxykuzjex[/url], [link=http://ckexllqhtlug.com/]ckexllqhtlug[/link], http://frvynmiuiulf.com/