Make ALTER TABLE RENAME on a view rename the view's on-select rule too.

Needed to keep pg_dump from getting confused.
This commit is contained in:
Tom Lane
2001-08-12 21:35:19 +00:00
parent a0c449a0f8
commit 1b5cffacdf
8 changed files with 117 additions and 45 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: view.h,v 1.9 2001/01/24 19:43:23 momjian Exp $
* $Id: view.h,v 1.10 2001/08/12 21:35:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -16,7 +16,6 @@
#include "nodes/parsenodes.h"
extern char *MakeRetrieveViewRuleName(char *view_name);
extern void DefineView(char *view_name, Query *view_parse);
extern void RemoveView(char *view_name);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: rewriteDefine.h,v 1.9 2001/01/24 19:43:27 momjian Exp $
* $Id: rewriteDefine.h,v 1.10 2001/08/12 21:35:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -18,4 +18,6 @@
extern void DefineQueryRewrite(RuleStmt *args);
extern void RenameRewriteRule(char *oldname, char *newname);
#endif /* REWRITEDEFINE_H */

View File

@ -7,14 +7,16 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: rewriteSupport.h,v 1.16 2001/03/22 04:01:04 momjian Exp $
* $Id: rewriteSupport.h,v 1.17 2001/08/12 21:35:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef REWRITESUPPORT_H
#define REWRITESUPPORT_H
extern bool IsDefinedRewriteRule(char *ruleName);
extern bool IsDefinedRewriteRule(const char *ruleName);
extern char *MakeRetrieveViewRuleName(const char *view_name);
extern void SetRelationRuleStatus(Oid relationId, bool relHasRules,
bool relIsBecomingView);