agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: colinthart@gmail.com
Subject: SEQUENCE keyword is option on GRANT
Date: Mon, 31 Mar 2025 10:29:28 +0000
Message-ID: <174341696874.676.3652115828301752720@wrigleys.postgresql.org> (raw)

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
GRANT
colin@[local]:colin=> grant usage on sequence x to public; -- works as
expected
GRANT
colin@[local]:colin=> rollback;
ROLLBACK
colin@[local]:colin=> 

I'm not sure how intentional this is, and whether or not this is mandated by
the SQL standard.

Colin 't Hart


view thread (4+ messages)  latest in thread

Message-ID: <174341696874.676.3652115828301752720@wrigleys.postgresql.org>
Permalink:  ../174341696874.676.3652115828301752720@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/174341696874.676.3652115828301752720@wrigleys.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, colinthart@gmail.com
  Subject: Re: SEQUENCE keyword is option on GRANT
  In-Reply-To: <174341696874.676.3652115828301752720@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox