Grant
Grants access privileges to a user, a group, or to all users in the database.
Synopsis
GRANT privilege [, ...] ON object [, ...] TO { PUBLIC | GROUP group | username }
Parameters
privilegeThe privilege you wish to grant. Valid privileges are:
SELECTThe privilege allowing the specified user or group to access all columns in a specific table or view.
INSERTThe privilege allowing the specified user or group to insert data into all columns of a specified table.
UPDATEThe privilege allowing the specified user or group to update all columns of a specified table.
DELETEThe privilege allowing the specified user or group to delete rows from a specific table.
RULEThe privilege allowing the specified user or group to delete rules from a specified table or rule.
ALLA shorthand way to grant all of the previous privileges to the specified user or group.
objectThe name of the object upon which you are granting privileges. Valid object types are tables, views, and sequences.
PUBLICThe optional
PUBLICkeyword indicates that privilege be granted to all users of the database.groupThe name of a group to receive the privileges that you are granting.
usernameThe name of a PostgreSQL user to receive the privileges that you are granting. You can use
PUBLIChere to represent all users.
Results
CHANGEThe message returned when a target is successfully granted the specified privileges.
ERROR: ChangeAcl: class "object" not foundThe error returned if
objectis not found in the connected database.ERROR: aclparse: non-existent ...