Commit 72164e86 authored by Tom Lane's avatar Tom Lane

Remove memory leak from VACUUM parsing.

parent 57eeb0d3
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: analyze.c,v 1.148 2000/06/17 21:48:40 tgl Exp $ * $Id: analyze.c,v 1.149 2000/07/02 04:04:09 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -185,24 +185,6 @@ transformStmt(ParseState *pstate, Node *parseTree) ...@@ -185,24 +185,6 @@ transformStmt(ParseState *pstate, Node *parseTree)
} }
break; break;
case T_VacuumStmt:
{
MemoryContext oldcontext;
/*
* make sure that this Query is allocated in TopMemory
* context because vacuum spans transactions and we don't
* want to lose the vacuum Query due to end-of-transaction
* free'ing
*/
oldcontext = MemoryContextSwitchTo(TopMemoryContext);
result = makeNode(Query);
result->commandType = CMD_UTILITY;
result->utilityStmt = (Node *) parseTree;
MemoryContextSwitchTo(oldcontext);
}
break;
case T_ExplainStmt: case T_ExplainStmt:
{ {
ExplainStmt *n = (ExplainStmt *) parseTree; ExplainStmt *n = (ExplainStmt *) parseTree;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment