提交 f2122d09 编写于 作者: T Tom Lane

Permissions were not checked correctly when one view invokes another.

Per bug report from Lieven Van Acker, 5/2/01.
上级 d31b9f31
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.92 2001/04/17 00:32:58 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.93 2001/05/03 17:47:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -309,9 +309,11 @@ ApplyRetrieveRule(Query *parsetree,
Assert(subrte->relid == relation->rd_id);
subrte->checkForRead = rte->checkForRead;
subrte->checkForWrite = rte->checkForWrite;
subrte->checkAsUser = rte->checkAsUser;
rte->checkForRead = false; /* no permission check on subquery itself */
rte->checkForWrite = false;
rte->checkAsUser = InvalidOid;
/*
* FOR UPDATE of view?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册