PostgreSQL Source Code git master
|
#include "fe_utils/psqlscan.h"
Go to the source code of this file.
Data Structures | |
struct | PgBenchValue |
struct | PgBenchExpr |
struct | PgBenchExprLink |
struct | PgBenchExprList |
Macros | |
#define | yyscan_t void * |
Typedefs | |
typedef enum PgBenchExprType | PgBenchExprType |
typedef enum PgBenchFunction | PgBenchFunction |
typedef struct PgBenchExpr | PgBenchExpr |
typedef struct PgBenchExprLink | PgBenchExprLink |
typedef struct PgBenchExprList | PgBenchExprList |
Enumerations | |
enum | PgBenchValueType { PGBT_NO_VALUE = 0 , PGBT_NULL , PGBT_INT , PGBT_DOUBLE , PGBT_BOOLEAN } |
enum | PgBenchExprType { ENODE_CONSTANT , ENODE_VARIABLE , ENODE_FUNCTION } |
enum | PgBenchFunction { PGBENCH_ADD , PGBENCH_SUB , PGBENCH_MUL , PGBENCH_DIV , PGBENCH_MOD , PGBENCH_DEBUG , PGBENCH_ABS , PGBENCH_LEAST , PGBENCH_GREATEST , PGBENCH_INT , PGBENCH_DOUBLE , PGBENCH_PI , PGBENCH_SQRT , PGBENCH_LN , PGBENCH_EXP , PGBENCH_RANDOM , PGBENCH_RANDOM_GAUSSIAN , PGBENCH_RANDOM_EXPONENTIAL , PGBENCH_RANDOM_ZIPFIAN , PGBENCH_POW , PGBENCH_AND , PGBENCH_OR , PGBENCH_NOT , PGBENCH_BITAND , PGBENCH_BITOR , PGBENCH_BITXOR , PGBENCH_LSHIFT , PGBENCH_RSHIFT , PGBENCH_EQ , PGBENCH_NE , PGBENCH_LE , PGBENCH_LT , PGBENCH_IS , PGBENCH_CASE , PGBENCH_HASH_FNV1A , PGBENCH_HASH_MURMUR2 , PGBENCH_PERMUTE } |
Functions | |
int | expr_yyparse (yyscan_t yyscanner) |
int | expr_yylex (union YYSTYPE *yylval_param, yyscan_t yyscanner) |
void | expr_yyerror (yyscan_t yyscanner, const char *message) pg_attribute_noreturn() |
void | expr_yyerror_more (yyscan_t yyscanner, const char *message, const char *more) pg_attribute_noreturn() |
bool | expr_lex_one_word (PsqlScanState state, PQExpBuffer word_buf, int *offset) |
yyscan_t | expr_scanner_init (PsqlScanState state, const char *source, int lineno, int start_offset, const char *command) |
void | expr_scanner_finish (yyscan_t yyscanner) |
int | expr_scanner_offset (PsqlScanState state) |
char * | expr_scanner_get_substring (PsqlScanState state, int start_offset, int end_offset, bool chomp) |
int | expr_scanner_get_lineno (PsqlScanState state, int offset) |
void | syntax_error (const char *source, int lineno, const char *line, const char *command, const char *msg, const char *more, int column) pg_attribute_noreturn() |
bool | strtoint64 (const char *str, bool errorOK, int64 *result) |
bool | strtodouble (const char *str, bool errorOK, double *dv) |
Variables | |
PgBenchExpr * | expr_parse_result |
typedef struct PgBenchExpr PgBenchExpr |
typedef struct PgBenchExprLink PgBenchExprLink |
typedef struct PgBenchExprList PgBenchExprList |
typedef enum PgBenchExprType PgBenchExprType |
typedef enum PgBenchFunction PgBenchFunction |
enum PgBenchExprType |
Enumerator | |
---|---|
ENODE_CONSTANT | |
ENODE_VARIABLE | |
ENODE_FUNCTION |
enum PgBenchFunction |
Definition at line 65 of file pgbench.h.
enum PgBenchValueType |
Enumerator | |
---|---|
PGBT_NO_VALUE | |
PGBT_NULL | |
PGBT_INT | |
PGBT_DOUBLE | |
PGBT_BOOLEAN |
Definition at line 34 of file pgbench.h.
bool expr_lex_one_word | ( | PsqlScanState | state, |
PQExpBuffer | word_buf, | ||
int * | offset | ||
) |
Definition at line 320 of file exprscan.l.
References Assert, expr_scanner_offset(), PQExpBufferData::len, psql_scan_reselect_sql_lexer(), resetPQExpBuffer(), and yylex().
Referenced by process_backslash_command().
void expr_scanner_finish | ( | yyscan_t | yyscanner | ) |
Definition at line 401 of file exprscan.l.
References psql_scan_reselect_sql_lexer(), and yyscanner.
Referenced by process_backslash_command().
int expr_scanner_get_lineno | ( | PsqlScanState | state, |
int | offset | ||
) |
Definition at line 461 of file exprscan.l.
Referenced by ParseScript(), and process_backslash_command().
char * expr_scanner_get_substring | ( | PsqlScanState | state, |
int | start_offset, | ||
int | end_offset, | ||
bool | chomp | ||
) |
Definition at line 431 of file exprscan.l.
References Assert, and pg_malloc().
Referenced by expr_yyerror_more(), and process_backslash_command().
yyscan_t expr_scanner_init | ( | PsqlScanState | state, |
const char * | source, | ||
int | lineno, | ||
int | start_offset, | ||
const char * | command | ||
) |
Definition at line 369 of file exprscan.l.
References Assert, expr_command, expr_lineno, expr_source, expr_start_offset, and source.
Referenced by process_backslash_command().
int expr_scanner_offset | ( | PsqlScanState | state | ) |
Definition at line 420 of file exprscan.l.
Referenced by expr_lex_one_word(), expr_yyerror_more(), ParseScript(), and process_backslash_command().
void expr_yyerror | ( | yyscan_t | yyscanner, |
const char * | message | ||
) |
Definition at line 309 of file exprscan.l.
References expr_yyerror_more(), and yyscanner.
void expr_yyerror_more | ( | yyscan_t | yyscanner, |
const char * | message, | ||
const char * | more | ||
) |
Definition at line 280 of file exprscan.l.
References expr_command, expr_lineno, expr_scanner_get_substring(), expr_scanner_offset(), expr_source, expr_start_offset, last_was_newline, syntax_error(), yylex(), and yyscanner.
Referenced by expr_yyerror().
int expr_yyparse | ( | yyscan_t | yyscanner | ) |
Referenced by process_backslash_command().
bool strtodouble | ( | const char * | str, |
bool | errorOK, | ||
double * | dv | ||
) |
Definition at line 1059 of file pgbench.c.
References pg_log_error, str, and unlikely.
Referenced by makeVariableValue().
bool strtoint64 | ( | const char * | str, |
bool | errorOK, | ||
int64 * | result | ||
) |
Definition at line 988 of file pgbench.c.
References PG_INT64_MIN, pg_log_error, pg_mul_s64_overflow(), pg_sub_s64_overflow(), str, and unlikely.
Referenced by makeVariableValue().
void syntax_error | ( | const char * | source, |
int | lineno, | ||
const char * | line, | ||
const char * | command, | ||
const char * | msg, | ||
const char * | more, | ||
int | column | ||
) |
Definition at line 5491 of file pgbench.c.
References appendPQExpBuffer(), buf, exit(), fprintf, initPQExpBuffer(), pg_log_error, printfPQExpBuffer(), source, and termPQExpBuffer().
Referenced by expr_yyerror_more(), ParseScript(), process_backslash_command(), and string_to_uuid().
|
extern |
Referenced by process_backslash_command().