pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: jwieck@debis.com
Cc: jwieck@debis.com
Cc: hackers@postgreSQL.org
Subject: Re: [HACKERS] Open 6.4 items
Date: Fri, 2 Oct 1998 17:34:05 -0400 (EDT)
Message-ID: <199810022134.RAA20998@candle.pha.pa.us> (raw)
In-Reply-To: <m0zPAWZ-000EBQC@orion.SAPserv.Hamburg.dsh.de>

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@debis.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@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026




view thread (141+ messages)  latest in thread

Message-ID: <199810022134.RAA20998@candle.pha.pa.us>
Permalink:  ../199810022134.RAA20998@candle.pha.pa.us/
Also on:    postgresql.org/message-id/199810022134.RAA20998@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: maillist@candle.pha.pa.us, jwieck@debis.com, hackers@postgreSQL.org
  Subject: Re: [HACKERS] Open 6.4 items
  In-Reply-To: <199810022134.RAA20998@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox