Joshua Yanovski <pythonesque@gmail.com> writes:
> There is one other thing I noticed in that area of the code--namely, if
> NAMEDATALEN is low enough, an identifier can be truncated down to an empty
> identifier, since the check for empty identifier length is done before the
> call to truncate_identifier. But I doubt this will ever be a problem in
> practice and there may be other compensatory checks elsewhere.
That'd only be possible if NAMEDATALEN were smaller than the longest
possible multibyte character, which I think is not a case we need to
concern ourselves with. We currently don't support multibytes longer
than 4 bytes, and even if we do full Unicode somewhere down the line,
it'd still only be 6 bytes. I can't imagine anyone wanting to run
with NAMEDATALEN less than 16 or so --- even if they tried, it'd likely
not work because of conflicts in the names of built-in functions.
regards, tom lane