Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
24d48db3
Commit
24d48db3
authored
Apr 23, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. SHOW/RESET var fixed.
2. New VACUUM syntax (ANALYZE ...).
parent
bc67a461
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
26 deletions
+46
-26
src/backend/parser/gram.y
src/backend/parser/gram.y
+44
-25
src/backend/parser/keywords.c
src/backend/parser/keywords.c
+2
-1
No files found.
src/backend/parser/gram.y
View file @
24d48db3
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.3
1 1997/04/23 03:17:00 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.3
2 1997/04/23 06:04:42 vadim
Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -128,14 +128,14 @@ static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
...
@@ -128,14 +128,14 @@ static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
tableElementList, OptInherit, definition,
tableElementList, OptInherit, definition,
opt_with, def_args, def_name_list, func_argtypes,
opt_with, def_args, def_name_list, func_argtypes,
oper_argtypes, OptStmtList, OptStmtBlock, OptStmtMulti,
oper_argtypes, OptStmtList, OptStmtBlock, OptStmtMulti,
opt_column_list, columnList,
opt_column_list, columnList,
opt_va_list, va_list,
sort_clause, sortby_list, index_params, index_list,
sort_clause, sortby_list, index_params, index_list,
name_list, from_clause, from_list, opt_array_bounds, nest_array_bounds,
name_list, from_clause, from_list, opt_array_bounds, nest_array_bounds,
expr_list, attrs, res_target_list, res_target_list2,
expr_list, attrs, res_target_list, res_target_list2,
def_list, opt_indirection, group_clause, groupby_list
def_list, opt_indirection, group_clause, groupby_list
%type <boolean> opt_inh_star, opt_binary, opt_instead, opt_with_copy,
%type <boolean> opt_inh_star, opt_binary, opt_instead, opt_with_copy,
index_opt_unique, opt_verbose
index_opt_unique, opt_verbose
, opt_analyze
%type <ival> copy_dirn, archive_type, OptArchiveType, OptArchiveLocation,
%type <ival> copy_dirn, archive_type, OptArchiveType, OptArchiveLocation,
def_type, opt_direction, remove_type, opt_column, event
def_type, opt_direction, remove_type, opt_column, event
...
@@ -179,11 +179,12 @@ static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
...
@@ -179,11 +179,12 @@ static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
*/
*/
/* Keywords */
/* Keywords */
%token ABORT_TRANS, ACL, ADD, AFTER, AGGREGATE, ALL, ALTER, AND, APPEND,
%token ABORT_TRANS, ACL, ADD, AFTER, AGGREGATE, ALL, ALTER, ANALYZE,
ARCHIVE, ARCH_STORE, AS, ASC, BACKWARD, BEFORE, BEGIN_TRANS, BETWEEN,
AND, APPEND, ARCHIVE, ARCH_STORE, AS, ASC,
BINARY, BY, CAST, CHANGE, CLOSE, CLUSTER, COLUMN, COMMIT, COPY, CREATE,
BACKWARD, BEFORE, BEGIN_TRANS, BETWEEN, BINARY, BY,
CURRENT, CURSOR, DATABASE, DECLARE, DELETE, DELIMITERS, DESC, DISTINCT,
CAST, CHANGE, CLOSE, CLUSTER, COLUMN, COMMIT, COPY, CREATE,
DO, DROP, END_TRANS,
CURRENT, CURSOR, DATABASE, DECLARE, DELETE, DELIMITERS, DESC,
DISTINCT, DO, DROP, END_TRANS,
EXTEND, FETCH, FOR, FORWARD, FROM, FUNCTION, GRANT, GROUP,
EXTEND, FETCH, FOR, FORWARD, FROM, FUNCTION, GRANT, GROUP,
HAVING, HEAVY, IN, INDEX, INHERITS, INSERT, INSTEAD, INTO, IS,
HAVING, HEAVY, IN, INDEX, INHERITS, INSERT, INSTEAD, INTO, IS,
ISNULL, LANGUAGE, LIGHT, LISTEN, LOAD, MERGE, MOVE, NEW,
ISNULL, LANGUAGE, LIGHT, LISTEN, LOAD, MERGE, MOVE, NEW,
...
@@ -291,7 +292,6 @@ VariableSetStmt: SET var_name TO var_value
...
@@ -291,7 +292,6 @@ VariableSetStmt: SET var_name TO var_value
VariableSetStmt *n = makeNode(VariableSetStmt);
VariableSetStmt *n = makeNode(VariableSetStmt);
n->name = $2;
n->name = $2;
n->value = $4;
n->value = $4;
$$ = (Node *) n;
$$ = (Node *) n;
}
}
;
;
...
@@ -301,20 +301,16 @@ var_value: Sconst { $$ = $1; }
...
@@ -301,20 +301,16 @@ var_value: Sconst { $$ = $1; }
VariableShowStmt: SHOW var_name
VariableShowStmt: SHOW var_name
{
{
VariableSetStmt *n = makeNode(VariableSet
Stmt);
VariableShowStmt *n = makeNode(VariableShow
Stmt);
n->name = $2;
n->name = $2;
n->value = NULL;
$$ = (Node *) n;
$$ = (Node *) n;
}
}
;
;
VariableResetStmt: RESET var_name
VariableResetStmt: RESET var_name
{
{
VariableSetStmt *n = makeNode(VariableS
etStmt);
VariableResetStmt *n = makeNode(VariableRes
etStmt);
n->name = $2;
n->name = $2;
n->value = NULL;
$$ = (Node *) n;
$$ = (Node *) n;
}
}
;
;
...
@@ -1295,17 +1291,24 @@ ClusterStmt: CLUSTER index_name ON relation_name
...
@@ -1295,17 +1291,24 @@ ClusterStmt: CLUSTER index_name ON relation_name
*
*
*****************************************************************************/
*****************************************************************************/
VacuumStmt: VACUUM opt_verbose
VacuumStmt: VACUUM opt_verbose
opt_analyze
{
{
VacuumStmt *n = makeNode(VacuumStmt);
VacuumStmt *n = makeNode(VacuumStmt);
n->verbose = $2;
n->verbose = $2;
n->analyze = $3;
n->vacrel = NULL;
n->va_spec = NIL;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| VACUUM opt_verbose relation_name
| VACUUM opt_verbose relation_name
opt_analyze opt_va_list
{
{
VacuumStmt *n = makeNode(VacuumStmt);
VacuumStmt *n = makeNode(VacuumStmt);
n->verbose = $2;
n->verbose = $2;
n->analyze = $4;
n->vacrel = $3;
n->vacrel = $3;
n->va_spec = $5;
if ( $5 != NIL && !$4 )
elog (WARN, "parser: syntax error at or near \"(\"");
$$ = (Node *)n;
$$ = (Node *)n;
}
}
;
;
...
@@ -1314,6 +1317,22 @@ opt_verbose: VERBOSE { $$ = TRUE; }
...
@@ -1314,6 +1317,22 @@ opt_verbose: VERBOSE { $$ = TRUE; }
| /* EMPTY */ { $$ = FALSE; }
| /* EMPTY */ { $$ = FALSE; }
;
;
opt_analyze: ANALYZE { $$ = TRUE; }
| /* EMPTY */ { $$ = FALSE; }
;
opt_va_list: '(' va_list ')'
{ $$ = $2; }
| /* EMPTY */
{ $$ = NIL; }
;
va_list: name
{ $$=lcons($1,NIL); }
| va_list ',' name
{ $$=lappend($1,$3); }
;
/*****************************************************************************
/*****************************************************************************
*
*
* QUERY:
* QUERY:
...
...
src/backend/parser/keywords.c
View file @
24d48db3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.
9 1997/04/23 03:17:04 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.
10 1997/04/23 06:04:46 vadim
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -38,6 +38,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -38,6 +38,7 @@ static ScanKeyword ScanKeywords[] = {
{
"aggregate"
,
AGGREGATE
},
{
"aggregate"
,
AGGREGATE
},
{
"all"
,
ALL
},
{
"all"
,
ALL
},
{
"alter"
,
ALTER
},
{
"alter"
,
ALTER
},
{
"analyze"
,
ANALYZE
},
{
"and"
,
AND
},
{
"and"
,
AND
},
{
"append"
,
APPEND
},
{
"append"
,
APPEND
},
{
"archIve"
,
ARCHIVE
},
/* XXX crooked: I < _ */
{
"archIve"
,
ARCHIVE
},
/* XXX crooked: I < _ */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment