pgsql: Fix psql lexer to avoid use of backtracking.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix psql lexer to avoid use of backtracking.
Дата
Msg-id E1QwelT-0007oO-2G@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix psql lexer to avoid use of backtracking.

Per previous experimentation, backtracking slows down lexing performance
significantly (by about a third).  It's usually pretty easy to avoid, just
need to have rules that accept an incomplete construct and do whatever the
lexer would have done otherwise.

The backtracking was introduced by the patch that added quoted variable
substitution.  Back-patch to 9.0 where that was added.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/be93200c76911047dcb94ddb696441ecdef9a3cb

Modified Files
--------------
src/bin/psql/psqlscan.l |   33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Add "%option warn" to all flex input files that lacked it.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix psql lexer to avoid use of backtracking.