\z meta-command in vsql

Moderator: NorbertKrupa

Post Reply
User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1823
Joined: Sat Jan 21, 2012 4:58 am
Contact:

\z meta-command in vsql

Post by JimKnicely » Mon Apr 28, 2014 4:07 pm

In vsql we can view the grants on a table using the \z meta-command.

Example:

Code: Select all

dbadmin=> create table public.test (col1 int);
CREATE TABLE
dbadmin=> create user test_user;
CREATE USER
dbadmin=> grant insert, update on public.test to test_user;
GRANT PRIVILEGE
dbadmin=> \z public.test;
                       Access privileges for database "dbadmin"
  Grantee  | Grantor |                   Privileges                    | Schema | Name 
-----------+---------+-------------------------------------------------+--------+------
 dbadmin   | dbadmin | INSERT*, SELECT*, UPDATE*, DELETE*, REFERENCES* | public | test
 test_user | dbadmin | INSERT, UPDATE                                  | public | test
(2 rows)
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica Tips, Lessons and Examples”