From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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 12:44:52 -0500
Message-ID: <6917.1392313492@sss.pgh.pa.us> (raw)
In-Reply-To: <20140213024415.2708.54432@wrigleys.postgresql.org>
References: <20140213024415.2708.54432@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
pythonesque@gmail.com writes:
> As in description. This follows from how these are scanned in scan.l:
> ident = litbuf_udeescape('\\', yyscanner);
> if (yyextra->literallen >= NAMEDATALEN)
> truncate_identifier(ident, yyextra->literallen, true);
Yeah, that's a bug --- yyextra->literallen is not the thing to use here.
It's just luck that truncate_identifier doesn't fail entirely, since
we're violating its API contract. Will fix, thanks for reporting it.
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: <6917.1392313492@sss.pgh.pa.us>
References: <20140213024415.2708.54432@wrigleys.postgresql.org> <6917.1392313492@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