From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joshua Yanovski <pythonesque@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers
Date: Thu, 13 Feb 2014 13:57:53 -0500
Message-ID: <14955.1392317873@sss.pgh.pa.us> (raw)
In-Reply-To: <CABz-M-G25NEfT3kZMUwkgVcTiCjJqYBHUvKSNjFOO8OJJysUiQ@mail.gmail.com>
References: <20140213024415.2708.54432@wrigleys.postgresql.org>
<6917.1392313492@sss.pgh.pa.us>
<CABz-M-G25NEfT3kZMUwkgVcTiCjJqYBHUvKSNjFOO8OJJysUiQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pythonesque@gmail.com
Subject: Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers
In-Reply-To: <14955.1392317873@sss.pgh.pa.us>
References: <20140213024415.2708.54432@wrigleys.postgresql.org> <6917.1392313492@sss.pgh.pa.us> <CABz-M-G25NEfT3kZMUwkgVcTiCjJqYBHUvKSNjFOO8OJJysUiQ@mail.gmail.com> <14955.1392317873@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox