From 16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Thu, 26 Apr 2007 16:13:15 +0000 Subject: Rename the newly-added commands for discarding session state. RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL, DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid confusion with the pre-existing RESET variants: the DISCARD commands are not actually similar to RESET. Patch from Marko Kreen, with some minor editorialization. --- src/include/nodes/nodes.h | 3 ++- src/include/nodes/parsenodes.h | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'src/include/nodes') diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 305be462e1..fc48961c5c 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.198 2007/04/02 03:49:41 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.199 2007/04/26 16:13:14 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -273,6 +273,7 @@ typedef enum NodeTag T_VariableSetStmt, T_VariableShowStmt, T_VariableResetStmt, + T_DiscardStmt, T_CreateTrigStmt, T_DropPropertyStmt, T_CreatePLangStmt, diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index dbc29642f0..09cb4ff503 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.346 2007/04/16 01:14:57 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.347 2007/04/26 16:13:14 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -1870,6 +1870,24 @@ typedef struct VariableResetStmt char *name; } VariableResetStmt; +/* ---------------------- + * Discard Statement + * ---------------------- + */ + +typedef enum DiscardMode +{ + DISCARD_ALL, + DISCARD_PLANS, + DISCARD_TEMP +} DiscardMode; + +typedef struct DiscardStmt +{ + NodeTag type; + DiscardMode target; +} DiscardStmt; + /* ---------------------- * LOCK Statement * ---------------------- -- cgit v1.2.1