pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: jens.troeger@light-speed.de
To: pgsql-docs@lists.postgresql.org
Subject: Re: LOCK docs and permissions
Date: Fri, 05 Apr 2024 14:09:53 +0200
Message-ID: <c3f865dad2389ddb189777d421a01951f58a23a8.camel@cybertec.at> (raw)
In-Reply-To: <171231274723.679.12709350477352678592@wrigleys.postgresql.org>
References: <171231274723.679.12709350477352678592@wrigleys.postgresql.org>

On Fri, 2024-04-05 at 10:25 +0000, PG Doc comments form wrote:
> Page: https://www.postgresql.org/docs/16/explicit-locking.html
> Description:
> 
> It appears that LOCK on a schema.table requires particular permissions but I
> can’t find which ones need to be granted in a schema.table in order to lock
> said table.
> 
> I think it would help to add a short blurb on that?

https://www.postgresql.org/docs/current/sql-lock.html#id-1.9.3.155.7

 "To lock a table, the user must have the right privilege for the specified
  lockmode, or be the table's owner or a superuser. If the user has UPDATE,
  DELETE, or TRUNCATE privileges on the table, any lockmode is permitted.
  If the user has INSERT privileges on the table, ROW EXCLUSIVE MODE
  (or a less-conflicting mode as described in Section 13.3) is permitted.
  If a user has SELECT privileges on the  table, ACCESS SHARE MODE is permitted."

Yours,
Laurenz Albe





view thread (3+ messages)  latest in thread

Message-ID: <c3f865dad2389ddb189777d421a01951f58a23a8.camel@cybertec.at>
Permalink:  ../c3f865dad2389ddb189777d421a01951f58a23a8.camel@cybertec.at/
Also on:    postgresql.org/message-id/c3f865dad2389ddb189777d421a01951f58a23a8.camel@cybertec.at

 · 

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: laurenz.albe@cybertec.at, jens.troeger@light-speed.de, pgsql-docs@lists.postgresql.org
  Subject: Re: LOCK docs and permissions
  In-Reply-To: <c3f865dad2389ddb189777d421a01951f58a23a8.camel@cybertec.at>

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

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