Options

When I granted the user in schema and tables it is used by one day only

I have a question for granted the User, when I granted the user in schemas and tables it is used by one day, later and sooner it will be prompted permission denied to the user that I was granted, how it possible to unlimited used the schemas and tables? appreciate your feedback. Thank you.

Comments

  • Options
    Help me on this please.
  • Options
    If you drop that object in that period of time the grant will be lost !! 
    See example : 

    dbadmin=> grant select on rio_desc to test1;  GRANT PRIVILEGE  
    dbadmin=> SELECT grantee, grantor, privileges_description, object_schema, object_name
    dbadmin->    FROM grants WHERE grantee='test1';
     grantee | grantor | privileges_description | object_schema | object_name
    ---------+---------+------------------------+---------------+-------------
     test1   | dbadmin | USAGE                  |               | general
     test1   | dbadmin | SELECT                 | public        | rio_desc
    (2 rows) -- see grants given
    dbadmin=> SELECT grantee, grantor, privileges_description, object_schema, object_name
    dbadmin->    FROM grants WHERE grantee='test1' and object_name='rio_desc' ;
     grantee | grantor | privileges_description | object_schema | object_name
    ---------+---------+------------------------+---------------+-------------
     test1   | dbadmin | SELECT                 | public        | rio_desc
    (1 row) -- drop object
    dbadmin=> drop view rio_desc ;
    DROP VIEW
    dbadmin=> SELECT grantee, grantor, privileges_description, object_schema, object_name
    dbadmin->    FROM grants WHERE grantee='test1' and object_name='rio_desc' ;
     grantee | grantor | privileges_description | object_schema | object_name
    ---------+---------+------------------------+---------------+-------------
    (0 rows) -- no role left
    dbadmin=> create view rio_desc as select * from rio;
    CREATE VIEW
    dbadmin=> SELECT grantee, grantor, privileges_description, object_schema, object_name
    dbadmin->    FROM grants WHERE grantee='test1' and object_name='rio_desc' ;
     grantee | grantor | privileges_description | object_schema | object_name
    ---------+---------+------------------------+---------------+-------------
    (0 rows)
    -- still no role even after you recreate the object.

Leave a Comment

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