summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2007-04-12 06:53:49 +0000
committerNeil Conway <neilc@samurai.com>2007-04-12 06:53:49 +0000
commitd13e903beaecd45a3721e4c2a7f9ff842ce94a79 (patch)
tree3ded6910c6f451bb982fb5033735afd24927c5b6 /src/backend/parser
parente6e47f278d2ab0fc744b56fed86cc34299079037 (diff)
RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
reviewed by Neil Conway. This patch adds the following DDL command variants: RESET SESSION, RESET TEMP, RESET PLANS, CLOSE ALL, and DEALLOCATE ALL. RESET SESSION is intended for use by connection pool software and the like, in order to reset a client session to something close to its initial state. Note that while most of these command variants can be executed inside a transaction block (but are not transaction-aware!), RESET SESSION cannot. While this is inconsistent, it is intended to catch programmer mistakes: RESET SESSION in an open transaction block is probably unintended.
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 56278f56e5d..6aa81eec3ef 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.587 2007/04/08 00:26:34 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.588 2007/04/12 06:53:46 neilc Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -1667,6 +1667,12 @@ ClosePortalStmt:
n->portalname = $2;
$$ = (Node *)n;
}
+ | CLOSE ALL
+ {
+ ClosePortalStmt *n = makeNode(ClosePortalStmt);
+ n->portalname = NULL;
+ $$ = (Node *)n;
+ }
;
@@ -5591,6 +5597,18 @@ DeallocateStmt: DEALLOCATE name
n->name = $3;
$$ = (Node *) n;
}
+ | DEALLOCATE ALL
+ {
+ DeallocateStmt *n = makeNode(DeallocateStmt);
+ n->name = NULL;
+ $$ = (Node *) n;
+ }
+ | DEALLOCATE PREPARE ALL
+ {
+ DeallocateStmt *n = makeNode(DeallocateStmt);
+ n->name = NULL;
+ $$ = (Node *) n;
+ }
;
/*****************************************************************************