|
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 |
Typedefs | |
| typedef void * | yyscan_t |
| 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 (PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner) |
| int | expr_yylex (union YYSTYPE *yylval_param, yyscan_t yyscanner) |
| pg_noreturn void | expr_yyerror (PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner, const char *message) |
| pg_noreturn void | expr_yyerror_more (yyscan_t yyscanner, const char *message, const char *more) |
| 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) |
| char * | expr_scanner_get_substring (PsqlScanState state, int start_offset, bool chomp) |
| pg_noreturn void | syntax_error (const char *source, int lineno, const char *line, const char *command, const char *msg, const char *more, int column) |
| bool | strtoint64 (const char *str, bool errorOK, int64 *result) |
| bool | strtodouble (const char *str, bool errorOK, double *dv) |
| 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 318 of file exprscan.l.
References Assert(), PQExpBufferData::len, psql_scan_get_location(), psql_scan_reselect_sql_lexer(), resetPQExpBuffer(), and yylex().
Referenced by process_backslash_command().
| void expr_scanner_finish | ( | yyscan_t | yyscanner | ) |
Definition at line 402 of file exprscan.l.
References psql_scan_reselect_sql_lexer().
Referenced by process_backslash_command().
| char * expr_scanner_get_substring | ( | PsqlScanState | state, |
| int | start_offset, | ||
| bool | chomp | ||
| ) |
Definition at line 425 of file exprscan.l.
References 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 370 of file exprscan.l.
References Assert(), expr_command, expr_lineno, expr_source, expr_start_offset, and source.
Referenced by process_backslash_command().
| pg_noreturn void expr_yyerror | ( | PgBenchExpr ** | expr_parse_result_p, |
| yyscan_t | yyscanner, | ||
| const char * | message | ||
| ) |
Definition at line 307 of file exprscan.l.
References expr_yyerror_more().
| pg_noreturn void expr_yyerror_more | ( | yyscan_t | yyscanner, |
| const char * | message, | ||
| const char * | more | ||
| ) |
Definition at line 271 of file exprscan.l.
References expr_command, expr_lineno, expr_scanner_get_substring(), expr_source, expr_start_offset, last_was_newline, psql_scan_get_location(), syntax_error(), and yylex().
Referenced by expr_yyerror().
| int expr_yyparse | ( | PgBenchExpr ** | expr_parse_result_p, |
| yyscan_t | yyscanner | ||
| ) |
Referenced by process_backslash_command().
| bool strtodouble | ( | const char * | str, |
| bool | errorOK, | ||
| double * | dv | ||
| ) |
Definition at line 1049 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 1024 of file pgbench.c.
References pg_log_error, str, and unlikely.
Referenced by makeVariableValue().
| pg_noreturn 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 5581 of file pgbench.c.
References appendPQExpBuffer(), buf, fprintf, initPQExpBuffer(), pg_log_error, printfPQExpBuffer(), source, and termPQExpBuffer().
Referenced by expr_yyerror_more(), ParseScript(), pg_lsn_in_safe(), process_backslash_command(), and string_to_uuid().