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/backend/utils/misc/guc.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'src/backend/utils/misc/guc.c') diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9b1e813dc6c..a3a8f79a5d1 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.388 2007/04/22 03:52:40 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.389 2007/04/26 16:13:12 neilc Exp $ * *-------------------------------------------------------------------- */ @@ -5047,30 +5047,6 @@ GetPGVariableResultDesc(const char *name) return tupdesc; } -/* - * RESET SESSION command. - */ -static void -ResetSession(bool isTopLevel) -{ - /* - * Disallow RESET SESSION in a transaction block. This is arguably - * inconsistent (we don't make a similar check in the command - * sequence that RESET SESSION is equivalent to), but the idea is - * to catch mistakes: RESET SESSION inside a transaction block - * would leave the transaction still uncommitted. - */ - PreventTransactionChain(isTopLevel, "RESET SESSION"); - - SetPGVariable("session_authorization", NIL, false); - ResetAllOptions(); - DropAllPreparedStatements(); - PortalHashTableDeleteAll(); - Async_UnlistenAll(); - ResetPlanCache(); - ResetTempTableNamespace(); -} - /* * RESET command */ @@ -5079,13 +5055,6 @@ ResetPGVariable(const char *name, bool isTopLevel) { if (pg_strcasecmp(name, "all") == 0) ResetAllOptions(); - else if (pg_strcasecmp(name, "session") == 0) - ResetSession(isTopLevel); - else if (pg_strcasecmp(name, "temp") == 0 || - pg_strcasecmp(name, "temporary") == 0) - ResetTempTableNamespace(); - else if (pg_strcasecmp(name, "plans") == 0) - ResetPlanCache(); else set_config_option(name, NULL, -- cgit v1.2.3