PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
discard.h File Reference
#include "nodes/parsenodes.h"
Include dependency graph for discard.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void DiscardCommand (DiscardStmt *stmt, bool isTopLevel)
 

Function Documentation

void DiscardCommand ( DiscardStmt stmt,
bool  isTopLevel 
)

Definition at line 31 of file discard.c.

References DISCARD_ALL, DISCARD_PLANS, DISCARD_SEQUENCES, DISCARD_TEMP, DiscardAll(), elog, ERROR, ResetPlanCache(), ResetSequenceCaches(), ResetTempTableNamespace(), and DiscardStmt::target.

Referenced by standard_ProcessUtility().

32 {
33  switch (stmt->target)
34  {
35  case DISCARD_ALL:
36  DiscardAll(isTopLevel);
37  break;
38 
39  case DISCARD_PLANS:
41  break;
42 
43  case DISCARD_SEQUENCES:
45  break;
46 
47  case DISCARD_TEMP:
49  break;
50 
51  default:
52  elog(ERROR, "unrecognized DISCARD target: %d", stmt->target);
53  }
54 }
void ResetTempTableNamespace(void)
Definition: namespace.c:4047
#define ERROR
Definition: elog.h:43
void ResetPlanCache(void)
Definition: plancache.c:1860
void ResetSequenceCaches(void)
Definition: sequence.c:1927
DiscardMode target
Definition: parsenodes.h:3184
static void DiscardAll(bool isTopLevel)
Definition: discard.c:57
#define elog
Definition: elog.h:219