提交 e5a8da02 编写于 作者: B Bruce Momjian

    Please apply the patch at the end. Disables use of system
    columns of views at all (not only oid, cmin etc. too).
    pgsql=> select cmin from pg_rules;
    ERROR:  system column cmin not available - pg_rules is a view
    pgsql=> select * from pg_rules where pg_rules.oid = pg_class.oid;
    ERROR:  system column oid not available - pg_rules is a view
    pgsql=>

Jan
上级 2da5e598
......@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.22 1998/10/02 16:27:47 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.23 1998/10/02 21:53:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1777,6 +1777,8 @@ apply_RIR_view(Node **nodePtr, int rt_index, RangeTblEntry *rte, List *tlist, in
var->varno == rt_index) {
Node *exp;
if (var->varattno < 0)
elog(ERROR, "system column %s not available - %s is a view", get_attname(rte->relid, var->varattno), rte->relname);
exp = FindMatchingTLEntry(
tlist,
get_attname(rte->relid,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册