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!

alter schema "public" default include privileges

I'd like all existing users within schema public to access recently created tables.
Normally I just run "ALTER SCHEMA myschea DEFAULT INCLUDE PRIVILEGES;"
But this fails for schema public . Adding quotes doesn't seem to help.

https://www.vertica.com/docs/9.3.x/HTML/Content/Authoring/AdministratorsGuide/DBUsersAndPrivileges/Privileges/TableViewInheritance.htm

db=> alter schema "public" default include privileges;
ROLLBACK 4953:  The name "public" is a reserved name

Answers

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited August 2021

    Include the DB name... Like this:

    dbadmin=> SELECT database_name FROM databases;
     database_name
    ---------------
     verticademos
    (1 row)
    
    dbadmin=> ALTER SCHEMA "verticademos.public" DEFAULT INCLUDE PRIVILEGES;
    ALTER SCHEMA
    
    dbadmin=>  SELECT name, defaultinheritprivileges FROM vs_schemata WHERE name = 'public';
      name  | defaultinheritprivileges
    --------+--------------------------
     public | t
    (1 row)
    
  • perfect, thanks for the fast reply!

Leave a Comment

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