Difference between revisions of "\dp"
Jump to navigation
Jump to search
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | Lists tables, views and sequences with their associated access privileges: | + | [[Lists tables]], views and sequences with their associated access [[privileges]]: |
\dp | \dp | ||
\dp *.* | \dp *.* | ||
Line 13: | Line 13: | ||
+ | TABLE (and table-like objects) arwdDxt none \dp | ||
+ | |||
+ | |||
+ | https://www.postgresql.org/docs/9.3/sql-grant.html | ||
+ | <pre> | ||
+ | rolename=xxxx -- privileges granted to a role | ||
+ | =xxxx -- privileges granted to PUBLIC | ||
+ | |||
+ | r -- SELECT ("read") | ||
+ | w -- UPDATE ("write") | ||
+ | a -- INSERT ("append") | ||
+ | d -- DELETE | ||
+ | D -- TRUNCATE | ||
+ | x -- REFERENCES | ||
+ | t -- TRIGGER | ||
+ | X -- EXECUTE | ||
+ | U -- USAGE | ||
+ | C -- CREATE | ||
+ | c -- CONNECT | ||
+ | T -- TEMPORARY | ||
+ | arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects) | ||
+ | * -- grant option for preceding privilege | ||
+ | |||
+ | /yyyy -- role that granted this privilege | ||
+ | </pre> | ||
Line 20: | Line 45: | ||
* [[sequence]], [[table]] | * [[sequence]], [[table]] | ||
* [[views]] | * [[views]] | ||
− | * [[\ddp]] | + | * <code>[[\ddp]]</code> |
+ | * [[Access Control Lists (ACL)]] | ||
+ | * <code>[[\du]]</code> | ||
== See also == | == See also == |
Latest revision as of 11:56, 16 December 2022
Lists tables, views and sequences with their associated access privileges:
\dp \dp *.*
\dp Access privileges Schema | Name | Type | Access privileges | Column privileges | Policies --------+------------------------------------------+----------+---------------------------------------------+-------------------+----------
TABLE (and table-like objects) arwdDxt none \dp
https://www.postgresql.org/docs/9.3/sql-grant.html
rolename=xxxx -- privileges granted to a role =xxxx -- privileges granted to PUBLIC r -- SELECT ("read") w -- UPDATE ("write") a -- INSERT ("append") d -- DELETE D -- TRUNCATE x -- REFERENCES t -- TRIGGER X -- EXECUTE U -- USAGE C -- CREATE c -- CONNECT T -- TEMPORARY arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects) * -- grant option for preceding privilege /yyyy -- role that granted this privilege
Related[edit]
See also[edit]
GRANT
,\ddp
,GRANT USAGE
,GRANT ALL PRIVILEGES
,GRANT SELECT
, View GRANTs on Redshift,has_table_privilege
,has_schema_privilege
,HAS_DATABASE_PRIVILEGE
,SCHEMA
, Privileges,GRANT EXECUTE
- PostgreSQL:
psql
,.psqlrc, .pgpass
,$HOME/.pg service.conf
,-U, -W, -d
, meta-commands:\du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q
,show users
,show
,su - postgres
,psql -c, \?, \connect, \conninfo
,--version, --help
, PL/pgSQL
Advertising: