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

> > > 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) #

inline patch 1: src/backend/rewrite/rewriteHandler.c (+2/-0 lines) download inline-1.patchdiff -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,

view thread (141+ messages)  latest in thread

Message-ID: <m0zPAWZ-000EBQC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m0zPAWZ-000EBQC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m0zPAWZ-000EBQC@orion.SAPserv.Hamburg.dsh.de

 ·  · 

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: jwieck@debis.com, maillist@candle.pha.pa.us, hackers@postgreSQL.org
  Subject: Re: [HACKERS] Open 6.4 items
  In-Reply-To: <m0zPAWZ-000EBQC@orion.SAPserv.Hamburg.dsh.de>

* 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