*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.16 1999/07/17 20:18:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.17 1999/09/27 10:41:02 meskes Exp $
*
*-------------------------------------------------------------------------
*/
/* name, value */
{"abort", ABORT_TRANS},
{"absolute", ABSOLUTE},
+ {"access", ACCESS},
{"action", ACTION},
{"add", ADD},
{"after", AFTER},
{"collate", COLLATE},
{"column", COLUMN},
{"commit", COMMIT},
+ {"committed", COMMITTED},
{"constraint", CONSTRAINT},
{"copy", COPY},
{"create", CREATE},
{"encoding", ENCODING},
{"end", END_TRANS},
{"except", EXCEPT},
-
+ {"exclusive", EXCLUSIVE},
{"execute", EXECUTE},
{"exists", EXISTS},
{"explain", EXPLAIN},
{"from", FROM},
{"full", FULL},
{"function", FUNCTION},
+ {"global", GLOBAL},
{"grant", GRANT},
{"group", GROUP},
{"handler", HANDLER},
{"insert", INSERT},
{"instead", INSTEAD},
{"intersect", INTERSECT},
-
{"interval", INTERVAL},
{"into", INTO},
{"is", IS},
{"maxvalue", MAXVALUE},
{"minute", MINUTE_P},
{"minvalue", MINVALUE},
+ {"mode", MODE},
{"month", MONTH_P},
{"move", MOVE},
{"names", NAMES},
{"select", SELECT},
{"sequence", SEQUENCE},
{"serial", SERIAL},
+ {"serializable", SERIALIZABLE},
{"set", SET},
{"setof", SETOF},
+ {"share", SHARE},
{"show", SHOW},
{"start", START},
{"statement", STATEMENT},
{"trigger", TRIGGER},
{"trim", TRIM},
{"true", TRUE_P},
+ {"truncate", TRUNCATE},
{"trusted", TRUSTED},
{"type", TYPE_P},
{"union", UNION},
OFFSET, OIDS, OPERATOR, PASSWORD, PROCEDURAL,
RENAME, RESET, RETURNS, ROW, RULE,
SERIAL, SEQUENCE, SETOF, SHARE, SHOW, START, STATEMENT, STDIN, STDOUT,
- TRUSTED,
+ TRUNCATE, TRUSTED,
UNLISTEN, UNTIL, VACUUM, VALID, VERBOSE, VERSION
/* Special keywords, not in the query language - see the "lex" file */
%type update_target_el opt_id relation_name database_name
%type access_method attr_name class index_name name func_name
%type file_name AexprConst ParamNo TypeId
-%type in_expr_nodes a_expr b_expr
+%type in_expr_nodes a_expr b_expr TruncateStmt
%type opt_indirection expr_list extract_list extract_arg
%type position_list substr_list substr_from
%type trim_list in_expr substr_for attr attrs
| ClusterStmt { output_statement($1, 0); }
| DefineStmt { output_statement($1, 0); }
| DestroyStmt { output_statement($1, 0); }
+ | TruncateStmt { output_statement($1, 0); }
| DropPLangStmt { output_statement($1, 0); }
| DropTrigStmt { output_statement($1, 0); }
| DropUserStmt { output_statement($1, 0); }
}
;
-
+/*****************************************************************************
+ *
+ * QUERY:
+ * truncate table relname
+ *
+ *****************************************************************************/
+TruncateStmt: TRUNCATE TABLE relation_name
+ {
+ $$ = cat2_str(make1_str("drop table"), $3);
+ }
+ ;
/*****************************************************************************
*
| INSENSITIVE { $$ = make1_str("insensitive"); }
| INSTEAD { $$ = make1_str("instead"); }
| ISNULL { $$ = make1_str("isnull"); }
+ | ISOLATION { $$ = make1_str("isolation"); }
| KEY { $$ = make1_str("key"); }
| LANGUAGE { $$ = make1_str("language"); }
| LANCOMPILER { $$ = make1_str("lancompiler"); }
+ | LEVEL { $$ = make1_str("level"); }
| LOCATION { $$ = make1_str("location"); }
| MATCH { $$ = make1_str("match"); }
| MAXVALUE { $$ = make1_str("maxvalue"); }