How to find out sequence's grant information that who is have the grant about the table?

HyeontaeJuHyeontaeJu Vertica Customer

How to find out sequence's grant information that who is have the grant about the table?

Answers

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    Check the GRANTS system table.

    Example:

    dbadmin=> CREATE USER HyeontaeJu;
    CREATE USER
    dbadmin=> CREATE USER jim;
    CREATE USER
    dbadmin=> CREATE SEQUENCE some_seq;
    CREATE SEQUENCE
    dbadmin=> GRANT SELECT ON SEQUENCE some_seq TO HyeontaeJu, jim;
    GRANT PRIVILEGE
    dbadmin=> SELECT grantee, privileges_description FROM grants WHERE object_name = 'some_seq' AND object_type = 'SEQUENCE';
      grantee   | privileges_description
    ------------+------------------------
     dbadmin    | SELECT*, ALTER*, DROP*
     HyeontaeJu | SELECT
     jim        | SELECT
    (3 rows)
    

    Doc Page:
    https://www.vertica.com/docs/latest/HTML/Content/Authoring/SQLReferenceManual/SystemTables/CATALOG/GRANTS.htm

Leave a Comment

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