[pgpool-committers: 3029] pgpool: Properly process empty query (all comments)

Tatsuo Ishii ishii at postgresql.org
Wed Feb 17 18:07:43 JST 2016

Properly process empty query (all comments)

Per bug#154. Pgpool-II recognizes empty query, for example "/* DBD::Pg
ping test v3.5.3 */" (note that no ';') as an error and emits message
" Unable to parse the query". This is because raw_parser() cannot
distinguish an empty query from an error query due to the poor API
design. To fix this new out parameter "*error" added to the
function. If an error occurred, the variable is set to true and caller
can know the reason why raw_parser() returns NIL is because of error
or empty query. See [pgpool-hackers: 1359] for additional information.



Modified Files
src/include/parser/parser.h                        |  4 ++--
src/parser/parser.c                                |  9 +++++++-
src/protocol/pool_process_query.c                  |  5 +++--
src/protocol/pool_proto_modules.c                  | 25 +++++++++++++---------
.../tests/010.rewrite_timestamp/timestamp/main.c   |  3 ++-
5 files changed, 30 insertions(+), 16 deletions(-)

More information about the pgpool-committers mailing list