Skip to Content
Practical PostgreSQL
book

Practical PostgreSQL

by Joshua D. Drake, John C. Worsley
January 2002
Intermediate to advanced
640 pages
16h 39m
English
O'Reilly Media, Inc.
Content preview from Practical PostgreSQL

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

privilege

The privilege you wish to grant. Valid privileges are:

SELECT

The privilege allowing the specified user or group to access all columns in a specific table or view.

INSERT

The privilege allowing the specified user or group to insert data into all columns of a specified table.

UPDATE

The privilege allowing the specified user or group to update all columns of a specified table.

DELETE

The privilege allowing the specified user or group to delete rows from a specific table.

RULE

The privilege allowing the specified user or group to delete rules from a specified table or rule.

ALL

A shorthand way to grant all of the previous privileges to the specified user or group.

object

The name of the object upon which you are granting privileges. Valid object types are tables, views, and sequences.

PUBLIC

The optional PUBLIC keyword indicates that privilege be granted to all users of the database.

group

The name of a group to receive the privileges that you are granting.

username

The name of a PostgreSQL user to receive the privileges that you are granting. You can use PUBLIC here to represent all users.

Results

CHANGE

The message returned when a target is successfully granted the specified privileges.

ERROR: ChangeAcl: class "object" not found

The error returned if object is not found in the connected database.

ERROR: aclparse: non-existent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PostgreSQL: Up and Running, 2nd Edition

PostgreSQL: Up and Running, 2nd Edition

Regina O. Obe, Leo S. Hsu
Learning PostgreSQL 11 - Third Edition

Learning PostgreSQL 11 - Third Edition

Christopher Travers, Andrey Volkov
Learn PostgreSQL

Learn PostgreSQL

Luca Ferrari, Enrico Pirozzi
PostgreSQL High Performance Cookbook

PostgreSQL High Performance Cookbook

Dinesh Kumar, Chitij Chauhan

Publisher Resources

ISBN: 9781449309770Supplemental ContentErrata Page