Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers
Дата
Msg-id 6917.1392313492@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers  (pythonesque@gmail.com)
Ответы Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers  (Joshua Yanovski <pythonesque@gmail.com>)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #9198: psql -c 'SET; ...' not working
Следующее
От: Joshua Yanovski
Дата:
Сообщение: Re: BUG #9204: truncate_identifier may be called unnecessarily on escaped quoted identifiers