mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
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
This commit is contained in:
parent
2da5e598e6
commit
e5a8da02c2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user