summaryrefslogtreecommitdiff
path: root/src/include/commands/tablecmds.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/commands/tablecmds.h')
-rw-r--r--src/include/commands/tablecmds.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index b3d30acc359..b808a07e461 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.h
@@ -21,6 +21,16 @@
#include "storage/lock.h"
#include "utils/relcache.h"
+/*
+ * These values indicate how a relation was specified as the target to
+ * truncate in TRUNCATE command.
+ */
+#define TRUNCATE_REL_CONTEXT_NORMAL 1 /* specified without ONLY clause */
+#define TRUNCATE_REL_CONTEXT_ONLY 2 /* specified with ONLY clause */
+#define TRUNCATE_REL_CONTEXT_CASCADING 3 /* not specified but truncated
+ * due to dependency (e.g.,
+ * partition table) */
+
struct AlterTableUtilityContext; /* avoid including tcop/utility.h here */
@@ -56,8 +66,12 @@ extern void AlterRelationNamespaceInternal(Relation classRel, Oid relOid,
extern void CheckTableNotInUse(Relation rel, const char *stmt);
extern void ExecuteTruncate(TruncateStmt *stmt);
-extern void ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
- DropBehavior behavior, bool restart_seqs);
+extern void ExecuteTruncateGuts(List *explicit_rels,
+ List *relids,
+ List *relids_extra,
+ List *relids_logged,
+ DropBehavior behavior,
+ bool restart_seqs);
extern void SetRelationHasSubclass(Oid relationId, bool relhassubclass);