Re: SEQUENCE keyword is option on GRANT - Mailing list pgsql-docs

From David G. Johnston
Subject Re: SEQUENCE keyword is option on GRANT
Date
Msg-id CAKFQuwb0A=26P0YyRBx2G6ywDKzyxrBKuCHE3_F1D-U3ePdN5w@mail.gmail.com
Whole thread Raw
In response to SEQUENCE keyword is option on GRANT  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: SEQUENCE keyword is option on GRANT
List pgsql-docs

On Monday, March 31, 2025, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/sql-grant.html
Description:

The documentation indicates that they keyword SEQUENCE must precede the
sequence_name in a GRANT, but in my experience it is optional:

colin@adinkra:~$ psql
psql (17.4 (Debian 17.4-1.pgdg120+2))
Type "help" for help.

colin@[local]:colin=> create sequence x;
CREATE SEQUENCE
colin@[local]:colin=> grant select on x to public; -- should fail but
works


Sequences are relations (see pg_class) so the [TABLE] variant is able to target them, which is what you’ve written here.

David J.

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: SEQUENCE keyword is option on GRANT
Next
From: jian he
Date:
Subject: Re: SEQUENCE keyword is option on GRANT