From 03030512d1e4df78dc2543d3fe3b6d13e5cb63f6 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 17 Apr 2018 16:59:17 +0900 Subject: Add more infinite recursion detection while locking a view. Also add regression test cases for detecting infinite recursion in locking view tests. Some document enhancements. Patch by Yugo Nagata. --- doc/src/sgml/ref/lock.sgml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/lock.sgml b/doc/src/sgml/ref/lock.sgml index 96d477c2038..a225cea63b2 100644 --- a/doc/src/sgml/ref/lock.sgml +++ b/doc/src/sgml/ref/lock.sgml @@ -46,8 +46,8 @@ LOCK [ TABLE ] [ ONLY ] name [ * ] - When a view is specified to be locked, all relations appearing in the view - definition query are also locked recursively with the same lock mode. + When a view is locked, all relations appearing in the view definition + query are also locked recursively with the same lock mode. @@ -173,6 +173,13 @@ LOCK [ TABLE ] [ ONLY ] name [ * ] or TRUNCATE privileges. + + The user performing the lock on the view must have the corresponding privilege + on the view. In addition the view's owner must have the relevant privileges on + the underlying base relations, but the user performing the lock does + not need any permissions on the underlying base relations. + + LOCK TABLE is useless outside a transaction block: the lock would remain held only to the completion of the statement. Therefore -- cgit v1.2.3