diff options
author | Neil Conway <neilc@samurai.com> | 2007-04-26 16:13:15 +0000 |
---|---|---|
committer | Neil Conway <neilc@samurai.com> | 2007-04-26 16:13:15 +0000 |
commit | 16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a (patch) | |
tree | 6ec0d0c7b08584ef53bf340e4d71a156e9655eba /src/backend/utils/misc/guc.c | |
parent | 5ea27a4b2812d148f2516d130aee9dbaba45cedc (diff) | |
download | postgresql-16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a.tar.gz postgresql-16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a.zip |
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.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 33 |
1 files changed, 1 insertions, 32 deletions
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 <peter_e@gmx.net>. * * 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 $ * *-------------------------------------------------------------------- */ @@ -5048,30 +5048,6 @@ GetPGVariableResultDesc(const char *name) } /* - * 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 */ void @@ -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, |