Header And Logo

PostgreSQL
| The world's most advanced open source database.

Functions

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 30 of file discard.c.

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

Referenced by standard_ProcessUtility().

{
    switch (stmt->target)
    {
        case DISCARD_ALL:
            DiscardAll(isTopLevel);
            break;

        case DISCARD_PLANS:
            ResetPlanCache();
            break;

        case DISCARD_TEMP:
            ResetTempTableNamespace();
            break;

        default:
            elog(ERROR, "unrecognized DISCARD target: %d", stmt->target);
    }
}