Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsk2w-008xgo-TU for pgsql-docs@arkaria.postgresql.org; Fri, 05 Apr 2024 13:55:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rsk2u-00GNGQ-Hu for pgsql-docs@arkaria.postgresql.org; Fri, 05 Apr 2024 13:55:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsiR1-00EVX2-1z for pgsql-docs@lists.postgresql.org; Fri, 05 Apr 2024 12:12:43 +0000 Received: from mail.light-speed.de ([2a01:238:43f2:8900:dd04:e3a0:ee11:a73d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsiQy-000mZL-02 for pgsql-docs@lists.postgresql.org; Fri, 05 Apr 2024 12:12:42 +0000 Received: by mail.light-speed.de (Postfix, from userid 501) id 888B33D48843; Fri, 5 Apr 2024 14:12:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=light-speed.de; s=mail; t=1712319157; bh=q93ZHdLpAl5cmN/Rns1pCmv0zTYdNWuCh4vxWZlf4tQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=LyGwSybs6v5umvGP+u9/q9ZWu4MkCU2bOO+b//C0iBADJR7tsj6vC6e8Uuf6fmjgw XQk84xNoPvIPepnhZGCVMBFTfzoCwzqYusPjWf5bWlMm3esvJNge5EXBqhW2DwEbET sapOxkesLjtWzrHJY0qCwErbl1XsKcJs5+CnJQEc= Date: Fri, 5 Apr 2024 14:12:37 +0200 From: Jens =?iso-8859-15?Q?Tr=F6ger?= To: Laurenz Albe Cc: pgsql-docs@lists.postgresql.org Subject: Re: LOCK docs and permissions Message-ID: References: <171231274723.679.12709350477352678592@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thank you, Laurenz, I missed that completely 🤦🏻‍♂️ Jens > 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