Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WE1U0-0007GM-Qy for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Feb 2014 18:58:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WE1U0-0007Io-AG for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Feb 2014 18:58:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WE1Tz-0007Ih-8I for pgsql-bugs@postgresql.org; Thu, 13 Feb 2014 18:57:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WE1Tx-0007LQ-3O for pgsql-bugs@postgresql.org; Thu, 13 Feb 2014 18:57:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s1DIvrv0014956; Thu, 13 Feb 2014 13:57:53 -0500 From: Tom Lane To: Joshua Yanovski cc: pgsql-bugs@postgresql.org Subject: Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers In-reply-to: References: <20140213024415.2708.54432@wrigleys.postgresql.org> <6917.1392313492@sss.pgh.pa.us> Comments: In-reply-to Joshua Yanovski message dated "Thu, 13 Feb 2014 10:15:12 -0800" Date: Thu, 13 Feb 2014 13:57:53 -0500 Message-ID: <14955.1392317873@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Joshua Yanovski 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