summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2003-02-07 01:33:06 +0000
committerTom Lane2003-02-07 01:33:06 +0000
commit3acf42231634513e8ba3b67d1ea7cb275d8e5fb3 (patch)
treeeb7135d4ee43b178d7c11c31c7421c731d09f5e7 /src/include
parent00f1a41ab253b2e05397d041ba29d21f386b7f01 (diff)
Revise mechanism for getting rid of temp tables at backend shutdown.
Instead of grovelling through pg_class to find them, make use of the handy dandy dependency mechanism: just delete everything that depends on our temp schema. Unlike the pg_class scan, the dependency mechanism is smart enough to delete things in an order that doesn't fall foul of any dependency restrictions. Fixes problem reported by David Heggie: a temp table with a serial column may cause a backend FATAL exit at shutdown time, if it chances to try to delete the temp sequence first.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/dependency.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h
index d0c18b1c86e..4cc4e995418 100644
--- a/src/include/catalog/dependency.h
+++ b/src/include/catalog/dependency.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: dependency.h,v 1.5 2002/09/04 20:31:37 momjian Exp $
+ * $Id: dependency.h,v 1.6 2003/02/07 01:33:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,6 +84,8 @@ typedef struct ObjectAddress
extern void performDeletion(const ObjectAddress *object,
DropBehavior behavior);
+extern void deleteWhatDependsOn(const ObjectAddress *object);
+
extern void recordDependencyOnExpr(const ObjectAddress *depender,
Node *expr, List *rtable,
DependencyType behavior);