mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
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.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.277 2007/04/12 06:53:47 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.278 2007/04/26 16:13:12 neilc Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -29,6 +29,7 @@
|
||||
#include "commands/copy.h"
|
||||
#include "commands/dbcommands.h"
|
||||
#include "commands/defrem.h"
|
||||
#include "commands/discard.h"
|
||||
#include "commands/explain.h"
|
||||
#include "commands/lockcmds.h"
|
||||
#include "commands/portalcmds.h"
|
||||
@ -604,10 +605,7 @@ ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case OBJECT_DOMAIN:
|
||||
|
||||
/*
|
||||
* RemoveDomain does its own permissions checks
|
||||
*/
|
||||
/* RemoveDomain does its own permissions checks */
|
||||
RemoveDomain(names, stmt->behavior,
|
||||
stmt->missing_ok);
|
||||
break;
|
||||
@ -618,10 +616,7 @@ ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case OBJECT_SCHEMA:
|
||||
|
||||
/*
|
||||
* RemoveSchema does its own permissions checks
|
||||
*/
|
||||
/* RemoveSchema does its own permissions checks */
|
||||
RemoveSchema(names, stmt->behavior,
|
||||
stmt->missing_ok);
|
||||
break;
|
||||
@ -994,6 +989,10 @@ ProcessUtility(Node *parsetree,
|
||||
}
|
||||
break;
|
||||
|
||||
case T_DiscardStmt:
|
||||
DiscardCommand((DiscardStmt *) parsetree, isTopLevel);
|
||||
break;
|
||||
|
||||
case T_CreateTrigStmt:
|
||||
CreateTrigger((CreateTrigStmt *) parsetree, InvalidOid);
|
||||
break;
|
||||
@ -1752,12 +1751,22 @@ CreateCommandTag(Node *parsetree)
|
||||
break;
|
||||
|
||||
case T_VariableResetStmt:
|
||||
{
|
||||
VariableResetStmt *stmt = (VariableResetStmt *) parsetree;
|
||||
if (pg_strcasecmp(stmt->name, "session") == 0)
|
||||
tag = "RESET SESSION";
|
||||
else
|
||||
tag = "RESET";
|
||||
tag = "RESET";
|
||||
break;
|
||||
|
||||
case T_DiscardStmt:
|
||||
switch (((DiscardStmt *) parsetree)->target) {
|
||||
case DISCARD_ALL:
|
||||
tag = "DISCARD ALL";
|
||||
break;
|
||||
case DISCARD_PLANS:
|
||||
tag = "DISCARD PLANS";
|
||||
break;
|
||||
case DISCARD_TEMP:
|
||||
tag = "DISCARD TEMP";
|
||||
break;
|
||||
default:
|
||||
tag = "???";
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user