We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


alter schema "public" default include privileges — Vertica Forum

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