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
Mon Mar 29 17:02:52 CEST 2004
- 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 ecpg version to 3.2.0.
- Set compat library version to 1.2.
......
......@@ -8,7 +8,7 @@
*
*
* 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[] = {
{"after", AFTER},
{"aggregate", AGGREGATE},
{"all", ALL},
{"also", ALSO},
{"alter", ALTER},
{"analyse", ANALYSE}, /* British spelling */
{"analyze", ANALYZE},
......@@ -87,6 +88,7 @@ static ScanKeyword ScanKeywords[] = {
{"createdb", CREATEDB},
{"createuser", CREATEUSER},
{"cross", CROSS},
{"csv", CSV},
{"current_date", CURRENT_DATE},
{"current_time", CURRENT_TIME},
{"current_timestamp", CURRENT_TIMESTAMP},
......@@ -176,6 +178,7 @@ static ScanKeyword ScanKeywords[] = {
{"key", KEY},
{"lancompiler", LANCOMPILER},
{"language", LANGUAGE},
{"large", LARGE_P},
{"last", LAST_P},
{"leading", LEADING},
{"left", LEFT},
......@@ -208,9 +211,11 @@ static ScanKeyword ScanKeywords[] = {
{"nothing", NOTHING},
{"notify", NOTIFY},
{"notnull", NOTNULL},
{"nowait", NOWAIT},
{"null", NULL_P},
{"nullif", NULLIF},
{"numeric", NUMERIC},
{"object", OBJECT_P},
{"of", OF},
{"off", OFF},
{"offset", OFFSET},
......@@ -239,6 +244,7 @@ static ScanKeyword ScanKeywords[] = {
{"privileges", PRIVILEGES},
{"procedural", PROCEDURAL},
{"procedure", PROCEDURE},
{"quote", QUOTE},
{"read", READ},
{"real", REAL},
{"recheck", RECHECK},
......@@ -246,6 +252,7 @@ static ScanKeyword ScanKeywords[] = {
{"reindex", REINDEX},
{"relative", RELATIVE_P},
{"rename", RENAME},
{"repeatable", REPEATABLE},
{"replace", REPLACE},
{"reset", RESET},
{"restart", RESTART},
......@@ -302,6 +309,7 @@ static ScanKeyword ScanKeywords[] = {
{"truncate", TRUNCATE},
{"trusted", TRUSTED},
{"type", TYPE_P},
{"uncommitted", UNCOMMITTED},
{"unencrypted", UNENCRYPTED},
{"union", UNION},
{"unique", UNIQUE},
......@@ -359,17 +367,13 @@ ScanKeywordLookup(char *text)
/*
* Apply an ASCII-only downcasing. We must not use tolower() since it
* 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.
* may produce the wrong translation in some locales (eg, Turkish).
*/
for (i = 0; i < len; i++)
{
char ch = text[i];
if (ch >= 'A' && ch <= 'Z' && isupper((unsigned char) ch))
if (ch >= 'A' && ch <= 'Z')
ch += 'a' - 'A';
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