1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Improve pgbench error reporting.

This would have been worth doing on general principle anyway, but the
recent addition of an expression syntax to pgbench makes it an even
better idea than it would have been otherwise.

Fabien Coelho
This commit is contained in:
Robert Haas
2015-04-02 16:26:49 -04:00
parent 05cce2f903
commit e41beea0dd
3 changed files with 90 additions and 37 deletions

View File

@@ -47,7 +47,12 @@ extern PgBenchExpr *expr_parse_result;
extern int expr_yyparse(void);
extern int expr_yylex(void);
extern void expr_yyerror(const char *str);
extern void expr_scanner_init(const char *str);
extern void expr_scanner_init(const char *str, const char *source,
const int lineno, const char *line,
const char *cmd, const int ecol);
extern void syntax_error(const char* source, const int lineno, const char* line,
const char* cmd, const char* msg, const char* more,
const int col);
extern void expr_scanner_finish(void);
extern int64 strtoint64(const char *str);