The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Rename table not owner

sergey_hsergey_h Vertica Customer

Hi,
I can't rename table, if I not owner, why?

I see doc:
https://my.vertica.com/docs/9.0.x/HTML/index.htm#Authoring/SQLReferenceManual/Statements/ALTERTABLE.htm

Renaming a table requires USAGE and CREATE privilege on the table schema.

My user test

ga=> \dt test1
               List of tables
 Schema | Name  | Kind  |  Owner  | Comment 
--------+-------+-------+---------+---------
 openx  | test1 | table | dbadmin | 
(1 row)

\dp openx
                                       Access privileges for database "ga"
    Grantee     | Grantor |                             Privileges                              | Schema | Name  
----------------+---------+---------------------------------------------------------------------+--------+-------
 test | dbadmin | INSERT, SELECT, UPDATE, DELETE, REFERENCES, USAGE, CREATE, TRUNCATE |        | openx

ALTER TABLE openx.test1 rename to test2;
ROLLBACK 3989:  Must be owner of relation test1

Comments

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited January 2018

    Hi,

    I just reproduced your issue in Vertica 9.0.1. I opened a Jira ticket and will keep you updated on its progress. Note that this might be a documentation error.

    Thanks for reporting this!

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    @sergey_h - The documentation is incorrect when it says:

    • “Renaming a table requires USAGE and CREATE privileges on the schema that contains it”
    • “Renaming a table requires USAGE and CREATE privilege on the table schema.”

    A user must OWN the table in order to rename it! The documentation will be updated ASAP to reflect this requirement.

    Thanks again for pointing out this discrepancy.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file