Обсуждение: pgsql: Use a lexer and grammar for parsing walsender commands

Поиск
Список
Период
Сортировка

pgsql: Use a lexer and grammar for parsing walsender commands

От
Magnus Hagander
Дата:
Use a lexer and grammar for parsing walsender commands

Makes it easier to parse mainly the BASE_BACKUP command
with it's options, and avoids having to manually deal
with quoted identifiers in the label (previously broken),
and makes it easier to add new commands and options in
the future.

In passing, refactor the case statement in the walsender
to put each command in it's own function.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=fcd810c69adf11b6ec1cff35359be0dd27662eff

Modified Files
--------------
doc/src/sgml/protocol.sgml             |   21 ++-
src/backend/replication/Makefile       |   25 +++-
src/backend/replication/basebackup.c   |   17 +--
src/backend/replication/repl_gram.y    |  143 +++++++++++++++++
src/backend/replication/repl_scanner.l |  168 +++++++++++++++++++
src/backend/replication/walsender.c    |  276 ++++++++++++++++++++------------
src/include/replication/basebackup.h   |    2 +-
src/include/replication/replnodes.h    |   63 +++++++
src/include/replication/walsender.h    |   13 ++
src/tools/msvc/Mkvcbuild.pm            |    1 +
src/tools/msvc/pgbison.bat             |    1 +
src/tools/msvc/pgflex.bat              |    1 +
12 files changed, 603 insertions(+), 128 deletions(-)