1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

Tweak scanner/grammar interface so that the keyword-as-identifier rules

in gram.y can make use of the keywords.c string table, instead of having
their own copies of the keyword strings.  This saves a few kilobytes and
more importantly eliminates an opportunity for cut-and-paste errors.
This commit is contained in:
Tom Lane
2002-05-02 18:44:11 +00:00
parent 0041a3d72f
commit 3220fd2138
5 changed files with 300 additions and 294 deletions

View File

@@ -3,7 +3,7 @@
* back to source text
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.100 2002/04/28 00:49:13 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.101 2002/05/02 18:44:11 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -2611,7 +2611,7 @@ quote_identifier(const char *ident)
* Note: ScanKeywordLookup() does case-insensitive comparison, but
* that's fine, since we already know we have all-lower-case.
*/
if (ScanKeywordLookup((char *) ident) != NULL)
if (ScanKeywordLookup(ident) != NULL)
safe = false;
}