|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.61 2003/11/2919:52:08 pgsql Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.62 2004/04/2914:08:10 meskes Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -36,6 +36,7 @@ static ScanKeyword ScanKeywords[] = { |
36 | 36 | {"after",AFTER}, |
37 | 37 | {"aggregate",AGGREGATE}, |
38 | 38 | {"all",ALL}, |
| 39 | +{"also",ALSO}, |
39 | 40 | {"alter",ALTER}, |
40 | 41 | {"analyse",ANALYSE},/* British spelling */ |
41 | 42 | {"analyze",ANALYZE}, |
@@ -87,6 +88,7 @@ static ScanKeyword ScanKeywords[] = { |
87 | 88 | {"createdb",CREATEDB}, |
88 | 89 | {"createuser",CREATEUSER}, |
89 | 90 | {"cross",CROSS}, |
| 91 | +{"csv",CSV}, |
90 | 92 | {"current_date",CURRENT_DATE}, |
91 | 93 | {"current_time",CURRENT_TIME}, |
92 | 94 | {"current_timestamp",CURRENT_TIMESTAMP}, |
@@ -176,6 +178,7 @@ static ScanKeyword ScanKeywords[] = { |
176 | 178 | {"key",KEY}, |
177 | 179 | {"lancompiler",LANCOMPILER}, |
178 | 180 | {"language",LANGUAGE}, |
| 181 | +{"large",LARGE_P}, |
179 | 182 | {"last",LAST_P}, |
180 | 183 | {"leading",LEADING}, |
181 | 184 | {"left",LEFT}, |
@@ -208,9 +211,11 @@ static ScanKeyword ScanKeywords[] = { |
208 | 211 | {"nothing",NOTHING}, |
209 | 212 | {"notify",NOTIFY}, |
210 | 213 | {"notnull",NOTNULL}, |
| 214 | +{"nowait",NOWAIT}, |
211 | 215 | {"null",NULL_P}, |
212 | 216 | {"nullif",NULLIF}, |
213 | 217 | {"numeric",NUMERIC}, |
| 218 | +{"object",OBJECT_P}, |
214 | 219 | {"of",OF}, |
215 | 220 | {"off",OFF}, |
216 | 221 | {"offset",OFFSET}, |
@@ -239,13 +244,15 @@ static ScanKeyword ScanKeywords[] = { |
239 | 244 | {"privileges",PRIVILEGES}, |
240 | 245 | {"procedural",PROCEDURAL}, |
241 | 246 | {"procedure",PROCEDURE}, |
| 247 | +{"quote",QUOTE}, |
242 | 248 | {"read",READ}, |
243 | 249 | {"real",REAL}, |
244 | 250 | {"recheck",RECHECK}, |
245 | 251 | {"references",REFERENCES}, |
246 | 252 | {"reindex",REINDEX}, |
247 | 253 | {"relative",RELATIVE_P}, |
248 | 254 | {"rename",RENAME}, |
| 255 | +{"repeatable",REPEATABLE}, |
249 | 256 | {"replace",REPLACE}, |
250 | 257 | {"reset",RESET}, |
251 | 258 | {"restart",RESTART}, |
@@ -302,6 +309,7 @@ static ScanKeyword ScanKeywords[] = { |
302 | 309 | {"truncate",TRUNCATE}, |
303 | 310 | {"trusted",TRUSTED}, |
304 | 311 | {"type",TYPE_P}, |
| 312 | +{"uncommitted",UNCOMMITTED}, |
305 | 313 | {"unencrypted",UNENCRYPTED}, |
306 | 314 | {"union",UNION}, |
307 | 315 | {"unique",UNIQUE}, |
@@ -359,17 +367,13 @@ ScanKeywordLookup(char *text) |
359 | 367 |
|
360 | 368 | /* |
361 | 369 | * Apply an ASCII-only downcasing.We must not use tolower() since it |
362 | | - * may produce the wrong translation in some locales (eg, Turkish), |
363 | | - * and we don't trust isupper() very much either. In an ASCII-based |
364 | | - * encoding the tests against A and Z are sufficient, but we also |
365 | | - * check isupper() so that we will work correctly under EBCDIC. The |
366 | | - * actual case conversion step should work for either ASCII or EBCDIC. |
| 370 | + * may produce the wrong translation in some locales (eg, Turkish). |
367 | 371 | */ |
368 | 372 | for (i=0;i<len;i++) |
369 | 373 | { |
370 | 374 | charch=text[i]; |
371 | 375 |
|
372 | | -if (ch >='A'&&ch <='Z'&&isupper((unsignedchar)ch)) |
| 376 | +if (ch >='A'&&ch <='Z') |
373 | 377 | ch+='a'-'A'; |
374 | 378 | word[i]=ch; |
375 | 379 | } |
|