mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
;
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user