Privileges required for Table operations in HP Vertica
In the last article we talked about user privileges and their type, in this article we will continue to talk about Table based privileges.
To CREATE a table in a schema the user must be the owner of the schema or have the CREATE privileges along with USAGE privilege on the schema.
Example:
Grant the CREATE privileges to the test_user
- we see that the user is allowed to create a new table called tbl in the public schema.
To DROP a table the user must be the owner of the schema.
Example:
Like we said the user must be the owner of the table in order to drop that table.
- so let's change the tables owner
Now let's try to drop the table
To SELECT data from a table in Vertica
- in order for user to have the privileges to select/query data out of a table the user must have the SELECT privilege given to him.
Try again now
To DELETE data from a table in Vertica
- for this task the user must have the DELETE privilege granted to him
To
REFERENCE some column in a table in Vertica
- you will need the REFERENCES privilege on the specific table.
- see that an error appears, to fix this you need to grant the REFERENCE privileges to test_user on the public.one table.