Table Privileges
By default, only superusers and table owners have privileges to access a table. All other users and roles must have USAGE privileges on the table schema, and be granted one or more of the following privileges on the table itself:
Only SELECT privileges are valid for system tables.
- SELECT: Query tables. SELECT privileges are granted by default to the PUBLIC role.
-
INSERT: Insert rows, or and load data into tables with
COPY
.COPY FROM STDIN
is allowed for users with INSERT privileges, whileCOPY FROM file
requires admin privileges. - UPDATE: Update table rows.
- DELETE: Delete table rows.
- REFERENCES: Create foreign key constraints on this table. This privilege must be set on both referencing and referenced tables.
- TRUNCATE: Truncate table contents. Non-owners of tables can also execute the following partition operations on them:
- ALTER: Modify a table's DDL with
ALTER TABLE
. - DROP: Drop a table.