OSDN Git Service

Use a lexer and grammar for parsing walsender commands
authorMagnus Hagander <magnus@hagander.net>
Fri, 14 Jan 2011 15:30:33 +0000 (16:30 +0100)
committerMagnus Hagander <magnus@hagander.net>
Fri, 14 Jan 2011 15:30:33 +0000 (16:30 +0100)
commitfcd810c69adf11b6ec1cff35359be0dd27662eff
treeb4edb043afe37dc221b765572aa90dafafefcfc7
parent688423d004f4092aed73c73a3281c281d476436d
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.
12 files changed:
doc/src/sgml/protocol.sgml
src/backend/replication/Makefile
src/backend/replication/basebackup.c
src/backend/replication/repl_gram.y [new file with mode: 0644]
src/backend/replication/repl_scanner.l [new file with mode: 0644]
src/backend/replication/walsender.c
src/include/replication/basebackup.h
src/include/replication/replnodes.h [new file with mode: 0644]
src/include/replication/walsender.h
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/pgbison.bat
src/tools/msvc/pgflex.bat