Re: [HACKERS] Open 6.4 items

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: jwieck(at)debis(dot)com
Cc: jwieck(at)debis(dot)com, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Open 6.4 items
Date: 1998-10-02 21:34:05
Message-ID: 199810022134.RAA20998@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Applied.

> > > > SELECT * FROM pg_rules WHERE pg_rules.oid = pg_class.oid crashes
> > >
> > > Will take a look at it.
> > >
>
> 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=>
>
> initdb and regression tests still O.K.
>
> > > > handle oid's on views by either disallowing it or meaningful results
> > > > CREATE INDEX i_test ON pg_class (upper(relname)) fails
>
> Fixed by earlier applied patch.
>
>
> Jan
>
> --
>
> #======================================================================#
> # It's easier to get forgiveness for being wrong than for being right. #
> # Let's break this rule - forgive me. #
> #======================================== jwieck(at)debis(dot)com (Jan Wieck) #
>
> diff -cr src.orig/backend/rewrite/rewriteHandler.c src/backend/rewrite/rewriteHandler.c
> *** src.orig/backend/rewrite/rewriteHandler.c Fri Oct 2 19:32:27 1998
> --- src/backend/rewrite/rewriteHandler.c Fri Oct 2 19:43:15 1998
> ***************
> *** 1777,1782 ****
> --- 1777,1784 ----
> 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,
>

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-10-02 21:39:05 Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Previous Message Taral 1998-10-02 21:12:19 RE: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)