Commit d51d870f authored by Michael Meskes's avatar Michael Meskes

Synced parser and keyword list.

parent f378288e
...@@ -1769,6 +1769,14 @@ Sun Mar 14 12:59:15 CET 2004 ...@@ -1769,6 +1769,14 @@ Sun Mar 14 12:59:15 CET 2004
Mon Mar 29 17:02:52 CEST 2004 Mon Mar 29 17:02:52 CEST 2004
- Fixed possible segfault in type.c (by Juergen Cappel) - Fixed possible segfault in type.c (by Juergen Cappel)
Thu Apr 22 14:13:57 CEST 2004
- Fixed double usage of allocated memory.
Thu Apr 29 16:06:37 CEST 2004
- Synced parser and keyword list.
- Set pgtypes library version to 1.2. - Set pgtypes library version to 1.2.
- Set ecpg version to 3.2.0. - Set ecpg version to 3.2.0.
- Set compat library version to 1.2. - Set compat library version to 1.2.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.61 2003/11/29 19:52:08 pgsql Exp $ * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.62 2004/04/29 14:08:10 meskes Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -36,6 +36,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -36,6 +36,7 @@ static ScanKeyword ScanKeywords[] = {
{"after", AFTER}, {"after", AFTER},
{"aggregate", AGGREGATE}, {"aggregate", AGGREGATE},
{"all", ALL}, {"all", ALL},
{"also", ALSO},
{"alter", ALTER}, {"alter", ALTER},
{"analyse", ANALYSE}, /* British spelling */ {"analyse", ANALYSE}, /* British spelling */
{"analyze", ANALYZE}, {"analyze", ANALYZE},
...@@ -87,6 +88,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -87,6 +88,7 @@ static ScanKeyword ScanKeywords[] = {
{"createdb", CREATEDB}, {"createdb", CREATEDB},
{"createuser", CREATEUSER}, {"createuser", CREATEUSER},
{"cross", CROSS}, {"cross", CROSS},
{"csv", CSV},
{"current_date", CURRENT_DATE}, {"current_date", CURRENT_DATE},
{"current_time", CURRENT_TIME}, {"current_time", CURRENT_TIME},
{"current_timestamp", CURRENT_TIMESTAMP}, {"current_timestamp", CURRENT_TIMESTAMP},
...@@ -176,6 +178,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -176,6 +178,7 @@ static ScanKeyword ScanKeywords[] = {
{"key", KEY}, {"key", KEY},
{"lancompiler", LANCOMPILER}, {"lancompiler", LANCOMPILER},
{"language", LANGUAGE}, {"language", LANGUAGE},
{"large", LARGE_P},
{"last", LAST_P}, {"last", LAST_P},
{"leading", LEADING}, {"leading", LEADING},
{"left", LEFT}, {"left", LEFT},
...@@ -208,9 +211,11 @@ static ScanKeyword ScanKeywords[] = { ...@@ -208,9 +211,11 @@ static ScanKeyword ScanKeywords[] = {
{"nothing", NOTHING}, {"nothing", NOTHING},
{"notify", NOTIFY}, {"notify", NOTIFY},
{"notnull", NOTNULL}, {"notnull", NOTNULL},
{"nowait", NOWAIT},
{"null", NULL_P}, {"null", NULL_P},
{"nullif", NULLIF}, {"nullif", NULLIF},
{"numeric", NUMERIC}, {"numeric", NUMERIC},
{"object", OBJECT_P},
{"of", OF}, {"of", OF},
{"off", OFF}, {"off", OFF},
{"offset", OFFSET}, {"offset", OFFSET},
...@@ -239,6 +244,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -239,6 +244,7 @@ static ScanKeyword ScanKeywords[] = {
{"privileges", PRIVILEGES}, {"privileges", PRIVILEGES},
{"procedural", PROCEDURAL}, {"procedural", PROCEDURAL},
{"procedure", PROCEDURE}, {"procedure", PROCEDURE},
{"quote", QUOTE},
{"read", READ}, {"read", READ},
{"real", REAL}, {"real", REAL},
{"recheck", RECHECK}, {"recheck", RECHECK},
...@@ -246,6 +252,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -246,6 +252,7 @@ static ScanKeyword ScanKeywords[] = {
{"reindex", REINDEX}, {"reindex", REINDEX},
{"relative", RELATIVE_P}, {"relative", RELATIVE_P},
{"rename", RENAME}, {"rename", RENAME},
{"repeatable", REPEATABLE},
{"replace", REPLACE}, {"replace", REPLACE},
{"reset", RESET}, {"reset", RESET},
{"restart", RESTART}, {"restart", RESTART},
...@@ -302,6 +309,7 @@ static ScanKeyword ScanKeywords[] = { ...@@ -302,6 +309,7 @@ static ScanKeyword ScanKeywords[] = {
{"truncate", TRUNCATE}, {"truncate", TRUNCATE},
{"trusted", TRUSTED}, {"trusted", TRUSTED},
{"type", TYPE_P}, {"type", TYPE_P},
{"uncommitted", UNCOMMITTED},
{"unencrypted", UNENCRYPTED}, {"unencrypted", UNENCRYPTED},
{"union", UNION}, {"union", UNION},
{"unique", UNIQUE}, {"unique", UNIQUE},
...@@ -359,17 +367,13 @@ ScanKeywordLookup(char *text) ...@@ -359,17 +367,13 @@ ScanKeywordLookup(char *text)
/* /*
* Apply an ASCII-only downcasing. We must not use tolower() since it * Apply an ASCII-only downcasing. We must not use tolower() since it
* may produce the wrong translation in some locales (eg, Turkish), * may produce the wrong translation in some locales (eg, Turkish).
* and we don't trust isupper() very much either. In an ASCII-based
* encoding the tests against A and Z are sufficient, but we also
* check isupper() so that we will work correctly under EBCDIC. The
* actual case conversion step should work for either ASCII or EBCDIC.
*/ */
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
char ch = text[i]; char ch = text[i];
if (ch >= 'A' && ch <= 'Z' && isupper((unsigned char) ch)) if (ch >= 'A' && ch <= 'Z')
ch += 'a' - 'A'; ch += 'a' - 'A';
word[i] = ch; word[i] = ch;
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment