Skip to content

Commit 2fac94e

Browse files
committed
1. SHOW/RESET var fixed.
2. vacuum() call changed (ANALYZE).
1 parent 24d48db commit 2fac94e

File tree

2 files changed

+9
-65
lines changed

2 files changed

+9
-65
lines changed

src/backend/tcop/utility.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.15 1997/04/23 03:17:09 scrappy Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.16 1997/04/23 06:09:33 vadim Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -610,7 +610,9 @@ ProcessUtility(Node *parsetree,
610610
commandTag = "VACUUM";
611611
CHECK_IF_ABORTED();
612612
vacuum( ((VacuumStmt *) parsetree)->vacrel,
613-
((VacuumStmt *) parsetree)->verbose);
613+
((VacuumStmt *) parsetree)->verbose,
614+
((VacuumStmt *) parsetree)->analyze,
615+
((VacuumStmt *) parsetree)->va_spec);
614616
break;
615617

616618
case T_ExplainStmt:
@@ -649,15 +651,15 @@ ProcessUtility(Node *parsetree,
649651

650652
case T_VariableShowStmt:
651653
{
652-
VariableSetStmt *n = (VariableSetStmt *) parsetree;
654+
VariableShowStmt *n = (VariableShowStmt *) parsetree;
653655
GetPGVariable(n->name);
654656
commandTag = "SHOW VARIABLE";
655657
}
656658
break;
657659

658660
case T_VariableResetStmt:
659661
{
660-
VariableSetStmt *n = (VariableSetStmt *) parsetree;
662+
VariableResetStmt *n = (VariableResetStmt *) parsetree;
661663
ResetPGVariable(n->name);
662664
commandTag = "RESET VARIABLE";
663665
}

src/backend/tcop/variable.c

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,10 @@
11
/*
2-
* Routines for handling of SET var TO statements
2+
* Routines for handling of 'SET var TO', 'SHOW var' and 'RESET var'
3+
* statements.
34
*
4-
* $Id: variable.c,v 1.4 1997/04/23 03:17:16 scrappy Exp $
5+
* $Id: variable.c,v 1.5 1997/04/23 06:09:36 vadim Exp $
56
*
6-
* $Log: variable.c,v $
7-
* Revision 1.4 1997/04/23 03:17:16 scrappy
8-
* To: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
9-
* Subject: Re: [PATCHES] SET DateStyle patches
10-
*
11-
* On Tue, 22 Apr 1997, Thomas Lockhart wrote:
12-
*
13-
* > Some more patches! These (try to) finish implementing SET variable TO value
14-
* > for "DateStyle" (changed the name from simply "date" to be more descriptive).
15-
* > This is based on code from Martin and Bruce (?), which was easy to modify.
16-
* > The syntax is
17-
* >
18-
* > SET DateStyle TO 'iso'
19-
* > SET DateStyle TO 'postgres'
20-
* > SET DateStyle TO 'sql'
21-
* > SET DateStyle TO 'european'
22-
* > SET DateStyle TO 'noneuropean'
23-
* > SET DateStyle TO 'us' (same as "noneuropean")
24-
* > SET DateStyle TO 'default' (current same as "postgres,us")
25-
* >
26-
* > ("european" is just compared for the first 4 characters, and "noneuropean"
27-
* > is compared for the first 7 to allow less typing).
28-
* >
29-
* > Multiple arguments are allowed, so SET datestyle TO 'sql,euro' is valid.
30-
* >
31-
* > My mods also try to implement "SHOW variable" and "RESET variable", but
32-
* > that part just core dumps at the moment. I would guess that my errors
33-
* > are obvious to someone who knows what they are doing with the parser stuff,
34-
* > so if someone (Bruce and/or Martin??) could have it do the right thing
35-
* > we will have a more complete set of what we need.
36-
* >
37-
* > Also, I would like to have a floating point precision global variable to
38-
* > implement "SET precision TO 10" and perhaps "SET precision TO 10,2" for
39-
* > float8 and float4, but I don't know how to do that for integer types rather
40-
* > than strings. If someone is fixing the SHOW and RESET code, perhaps they can
41-
* > add some hooks for me to do the floats while they are at it.
42-
* >
43-
* > I've left some remnants of variable structures in the source code which
44-
* > I did not use in the interests of getting something working for v6.1.
45-
* > We'll have time to clean things up for the next release...
46-
*
47-
* Revision 1.3 1997/04/17 13:50:30 scrappy
48-
* From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
49-
* Subject: [HACKERS] Patch: set date to euro/us postgres/iso/sql
50-
*
51-
* Here a patch that implements a SET date for use by the datetime
52-
* stuff. The syntax is
53-
*
54-
* SET date TO 'val[,val,...]'
55-
*
56-
* where val is us (us dates), euro (european dates), postgres,
57-
* iso or sql.
58-
*
59-
* Thomas is working on the integration in his datetime module.
60-
* I just needed to get the patch out before it went stale :)
61-
*
62-
* Revision 1.1 1997/04/10 16:52:07 mjl
63-
* Initial revision
647
*/
65-
/*-----------------------------------------------------------------------*/
668

679
#include <stdio.h>
6810
#include <string.h>

0 commit comments

Comments
 (0)