pgsql: Make pgbench's expression lexer reentrant.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make pgbench's expression lexer reentrant.
Дата
Msg-id E1ahNbA-0007m6-Bz@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Make pgbench's expression lexer reentrant.  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
Make pgbench's expression lexer reentrant.

This is a necessary preliminary step for making it play with psqlscan.l
given the way I set up the lexer input-buffer sharing mechanism in commit
0ea9efbe9ec1bf07.

I've not tried to make it *actually* reentrant; there's still some static
variables laying about.  But flex thinks it's reentrant, and that's what
counts.

In support of that, fix exprparse.y to pass through the yyscan_t from the
caller.  Also do some minor code beautification, like not casting away
const.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/429ee5a822db0e8faf669d77c810f1eeaaff1ab4

Modified Files
--------------
src/bin/pgbench/exprparse.y | 57 ++++++++++++++++++++-----------
src/bin/pgbench/exprscan.l  | 83 ++++++++++++++++++++++++++++-----------------
src/bin/pgbench/pgbench.c   | 15 +++++---
src/bin/pgbench/pgbench.h   | 26 +++++++++-----
4 files changed, 117 insertions(+), 64 deletions(-)


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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: pgsql: pgbench: Allow changing weights for scripts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: pgbench: Silence new compiler warnings