Skip to content

Commit bf18402

Browse files
committed
Add note about access permission checks by inherited TRUNCATE and LOCK TABLE.
Inherited queries perform access permission checks on the parent table only. But there are two exceptions to this rule in v12 or before; TRUNCATE and LOCK TABLE commands through a parent table check the permissions on not only the parent table but also the children tables. Previously these exceptions were not documented. This commit adds the note about these exceptions, into the document. Back-patch to v9.4. But we don't apply this commit to the master because commit e6f1e56 already got rid of the exception about inherited TRUNCATE and upcoming commit will do for the exception about inherited LOCK TABLE. Author: Amit Langote Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CA+HiwqHfTnMU6SUkyHxCmpHUKk7ERLHCR3vZVq19ZOQBjPBLmQ@mail.gmail.com
1 parent d034ab0 commit bf18402

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/src/sgml/ddl.sgml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,11 @@ VALUES ('New York', NULL, NULL, 'NY');
23232323
access privilege checking. This preserves the appearance that the
23242324
data is (also) in the parent table. Accessing the child tables
23252325
directly is, however, not automatically allowed and would require
2326-
further privileges to be granted.
2326+
further privileges to be granted. Two exceptions to this rule are
2327+
<command>TRUNCATE</command> and <command>LOCK TABLE</command>,
2328+
where permissions on the child tables are always checked,
2329+
whether they are processed directly or recursively via those commands
2330+
performed on the parent table.
23272331
</para>
23282332

23292333
<sect2 id="ddl-inherit-caveats">

0 commit comments

Comments
 (0)