Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers
Date
Msg-id 14955.1392317873@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers  (Joshua Yanovski <pythonesque@gmail.com>)
Responses Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: digoal@126.com
Date:
Subject: BUG #9210: PostgreSQL string store bug? not enforce check with correct characterSET/encoding
Next
From: John R Pierce
Date:
Subject: Re: Need Information