Return-Path: owner-postman 
Delivery-Date: Mon, 25 Apr 94 20:21:06 -0700
Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id RAA10655 for postgres-redist; Mon, 25 Apr 1994 17:53:27 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199404260053.RAA10655@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id RAA10646 for <postgres@postgres.Berkeley.EDU>; Mon, 25 Apr 1994 17:53:26 -0700
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id RAA08882; Mon, 25 Apr 1994 17:53:16 -0700
Message-Id: <199404260053.RAA08882@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: perera@pollux.cs.uga.edu
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: "define view question" ( Another problem ? ) 
Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
In-reply-to: Your message of Mon, 25 Apr 94 20:31:39 EDT 
	     <9404260031.AA11245@pollux.cs.uga.edu> 
Date: Mon, 25 Apr 94 17:53:16 -0700
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-redist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Mon, 25 Apr 94 17:53:27 -0700
Resent-XMts: smtp

perera@pollux.cs.uga.edu writes:
> * remove rule demo \g
> Query sent to backend is "remove rule demo "
> WARN:Apr 25 20:26:37:prs2GetRuleEventRel: rule "demo" not found
> * remove view demo \g
> Query sent to backend is "remove view demo "
> WARN:Apr 25 20:26:47:RewriteGetRuleEventRel: class 340384 not found

views are
	- a rewrite (not instance) rule -- "define rule" and "remove 
	rule" default to instance rules
	- some other misc. catalog entries that define a fake table
	called "demo"
i would guess that in the process of trying to execute other commands
(perhaps "destroy demo") you removed the pg_class entry for "demo".

it's hard to say how to fix it without really knowing exactly what
you've already tried.  but
	remove rewrite rule _RETdemo
would probably be a good start.  if you can't do that, then you
probably did do a "destroy", and you would have to fall back to
	delete pg_rewrite where pg_rewrite.rulename = "_RETdemo"
(at least, i hope you did "destroy" instead of randomly removing
pg_class and pg_attribute tuples.)

in any event, remove view is the safe way to do it.  i stuck a
man page for it into the 4.2 reference manual so that will go out
with the final release (which will go out when we get solaris 
compilers, which will be soon i hope).
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki

