summaryrefslogtreecommitdiff
path: root/src/include/rewrite/rewriteSupport.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-06-30 07:04:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-06-30 07:04:23 +0000
commitb41f4ab8c448fc1bb13b52d00c9c4f1868d97941 (patch)
tree5e832a1210f93033aeab63a572dc81229ad4aa7c /src/include/rewrite/rewriteSupport.h
parentc9ec78a6b89e846c5b1be0aa40b6532ca209c850 (diff)
downloadpostgresql-b41f4ab8c448fc1bb13b52d00c9c4f1868d97941.tar.gz
Use a private memory context to store rule information in each relcache
entry that has rules. This allows us to release the rule parsetrees on relcache flush without needing a working freeObject() routine. Formerly, the rule trees were leaked permanently at relcache flush. Also, clean up handling of rule creation and deletion --- there was not sufficient locking of the relation being modified, and there was no reliable notification of other backends that a relcache reload was needed. Also, clean up relcache.c code so that scans of system tables needed to load a relcache entry are done in the caller's memory context, not in CacheMemoryContext. This prevents any un-pfreed memory from those scans from becoming a permanent memory leak.
Diffstat (limited to 'src/include/rewrite/rewriteSupport.h')
-rw-r--r--src/include/rewrite/rewriteSupport.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/include/rewrite/rewriteSupport.h b/src/include/rewrite/rewriteSupport.h
index 25541ed9b9..589f4245f7 100644
--- a/src/include/rewrite/rewriteSupport.h
+++ b/src/include/rewrite/rewriteSupport.h
@@ -7,22 +7,15 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteSupport.h,v 1.11 2000/01/26 05:58:30 momjian Exp $
+ * $Id: rewriteSupport.h,v 1.12 2000/06/30 07:04:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef REWRITESUPPORT_H
#define REWRITESUPPORT_H
-#include "access/attnum.h"
-#include "nodes/pg_list.h"
-
extern int IsDefinedRewriteRule(char *ruleName);
-extern void prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type,
- AttrNumber attno, bool isInstead, Node *qual,
- List *actions);
-extern void prs2_deleteFromRelation(Oid relid, Oid ruleId);
-
+extern void setRelhasrulesInRelation(Oid relationId, bool relhasrules);
#endif /* REWRITESUPPORT_H */