Skip to content

Commit 66270c9

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parent d1d97a9 commit 66270c9

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,3 +643,8 @@ Fri Sep 17 18:16:34 CEST 1999
643643
- Made sure sqlca is initialized everytime.
644644
- Set library version to 3.0.3
645645

646+
Mon Sep 27 07:40:20 CEST 1999
647+
648+
- Synced preproc.y with gram.y.
649+
- Synced keyword.c.
650+
- Set ecpg version to 2.6.5

src/interfaces/ecpg/preproc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include $(SRCDIR)/Makefile.global
33

44
MAJOR_VERSION=2
55
MINOR_VERSION=6
6-
PATCHLEVEL=4
6+
PATCHLEVEL=5
77

88
CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
99
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \

src/interfaces/ecpg/preproc/keywords.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.16 1999/07/17 20:18:39 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.17 1999/09/27 10:41:02 meskes Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -30,6 +30,7 @@ static ScanKeyword ScanKeywords[] = {
3030
/* name, value */
3131
{"abort", ABORT_TRANS},
3232
{"absolute", ABSOLUTE},
33+
{"access", ACCESS},
3334
{"action", ACTION},
3435
{"add", ADD},
3536
{"after", AFTER},
@@ -61,6 +62,7 @@ static ScanKeyword ScanKeywords[] = {
6162
{"collate", COLLATE},
6263
{"column", COLUMN},
6364
{"commit", COMMIT},
65+
{"committed", COMMITTED},
6466
{"constraint", CONSTRAINT},
6567
{"copy", COPY},
6668
{"create", CREATE},
@@ -90,7 +92,7 @@ static ScanKeyword ScanKeywords[] = {
9092
{"encoding", ENCODING},
9193
{"end", END_TRANS},
9294
{"except", EXCEPT},
93-
95+
{"exclusive", EXCLUSIVE},
9496
{"execute", EXECUTE},
9597
{"exists", EXISTS},
9698
{"explain", EXPLAIN},
@@ -105,6 +107,7 @@ static ScanKeyword ScanKeywords[] = {
105107
{"from", FROM},
106108
{"full", FULL},
107109
{"function", FUNCTION},
110+
{"global", GLOBAL},
108111
{"grant", GRANT},
109112
{"group", GROUP},
110113
{"handler", HANDLER},
@@ -119,7 +122,6 @@ static ScanKeyword ScanKeywords[] = {
119122
{"insert", INSERT},
120123
{"instead", INSTEAD},
121124
{"intersect", INTERSECT},
122-
123125
{"interval", INTERVAL},
124126
{"into", INTO},
125127
{"is", IS},
@@ -143,6 +145,7 @@ static ScanKeyword ScanKeywords[] = {
143145
{"maxvalue", MAXVALUE},
144146
{"minute", MINUTE_P},
145147
{"minvalue", MINVALUE},
148+
{"mode", MODE},
146149
{"month", MONTH_P},
147150
{"move", MOVE},
148151
{"names", NAMES},
@@ -199,8 +202,10 @@ static ScanKeyword ScanKeywords[] = {
199202
{"select", SELECT},
200203
{"sequence", SEQUENCE},
201204
{"serial", SERIAL},
205+
{"serializable", SERIALIZABLE},
202206
{"set", SET},
203207
{"setof", SETOF},
208+
{"share", SHARE},
204209
{"show", SHOW},
205210
{"start", START},
206211
{"statement", STATEMENT},
@@ -221,6 +226,7 @@ static ScanKeyword ScanKeywords[] = {
221226
{"trigger", TRIGGER},
222227
{"trim", TRIM},
223228
{"true", TRUE_P},
229+
{"truncate", TRUNCATE},
224230
{"trusted", TRUSTED},
225231
{"type", TYPE_P},
226232
{"union", UNION},

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
727727
OFFSET, OIDS, OPERATOR, PASSWORD, PROCEDURAL,
728728
RENAME, RESET, RETURNS, ROW, RULE,
729729
SERIAL, SEQUENCE, SETOF, SHARE, SHOW, START, STATEMENT, STDIN, STDOUT,
730-
TRUSTED,
730+
TRUNCATE, TRUSTED,
731731
UNLISTEN, UNTIL, VACUUM, VALID, VERBOSE, VERSION
732732

733733
/* Special keywords, not in the query language - see the "lex" file */
@@ -777,7 +777,7 @@ adjust_array(enum ECPGttype type_enum, int *dimension, int *length, int type_dim
777777
%type <str> update_target_el opt_id relation_name database_name
778778
%type <str> access_method attr_name class index_name name func_name
779779
%type <str> file_name AexprConst ParamNo TypeId
780-
%type <str> in_expr_nodes a_expr b_expr
780+
%type <str> in_expr_nodes a_expr b_expr TruncateStmt
781781
%type <str> opt_indirection expr_list extract_list extract_arg
782782
%type <str> position_list substr_list substr_from
783783
%type <str> trim_list in_expr substr_for attr attrs
@@ -881,6 +881,7 @@ stmt: AddAttrStmt { output_statement($1, 0); }
881881
| ClusterStmt { output_statement($1, 0); }
882882
| DefineStmt { output_statement($1, 0); }
883883
| DestroyStmt { output_statement($1, 0); }
884+
| TruncateStmt { output_statement($1, 0); }
884885
| DropPLangStmt { output_statement($1, 0); }
885886
| DropTrigStmt { output_statement($1, 0); }
886887
| DropUserStmt { output_statement($1, 0); }
@@ -1948,7 +1949,17 @@ DestroyStmt: DROP TABLE relation_name_list
19481949
}
19491950
;
19501951

1951-
1952+
/*****************************************************************************
1953+
*
1954+
* QUERY:
1955+
* truncate table relname
1956+
*
1957+
*****************************************************************************/
1958+
TruncateStmt: TRUNCATE TABLE relation_name
1959+
{
1960+
$$ = cat2_str(make1_str("drop table"), $3);
1961+
}
1962+
;
19521963

19531964
/*****************************************************************************
19541965
*
@@ -4283,9 +4294,11 @@ ColId: ident { $$ = $1; }
42834294
| INSENSITIVE { $$ = make1_str("insensitive"); }
42844295
| INSTEAD { $$ = make1_str("instead"); }
42854296
| ISNULL { $$ = make1_str("isnull"); }
4297+
| ISOLATION { $$ = make1_str("isolation"); }
42864298
| KEY { $$ = make1_str("key"); }
42874299
| LANGUAGE { $$ = make1_str("language"); }
42884300
| LANCOMPILER { $$ = make1_str("lancompiler"); }
4301+
| LEVEL { $$ = make1_str("level"); }
42894302
| LOCATION { $$ = make1_str("location"); }
42904303
| MATCH { $$ = make1_str("match"); }
42914304
| MAXVALUE { $$ = make1_str("maxvalue"); }

0 commit comments

Comments
 (0)