Peter Eisentraut <[EMAIL PROTECTED]> writes:
> 2. Using strcasecmp() on strings that were parsed as keywords.  See CREATE
> OPERATOR, CREATE AGGREGATE, CREATE TYPE, commands/define.c.

But the real point is that they were parsed as identifiers, *not*
keywords, and therefore have already been through a locale-dependent
case conversion.  (Look at what happens in scan.l after
ScanKeywordLookup fails.)  Unless we can undo or short-circuit that,
it won't help to apply a correct ASCII-only comparison.

Possibly we should change the parser's Ident node type to carry both the
raw string and the downcased-as-identifier string.  The latter would
serve the existing needs, the former could be used for keyword matching.

> For #2, we should export parts of ScanKeywordLookup as a generic function,
> perhaps "normalize_identifier", ...
> For #4, we need some ASCII-only strcasecmp version.

I think these are the same thing.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to