PostgreSQL Source Code git master
|
#include "postgres_fe.h"
#include <ctype.h>
#include "common.h"
#include "psqlscanslash.h"
#include "common/logging.h"
#include "fe_utils/conditional.h"
#include "libpq-fe.h"
#include "fe_utils/psqlscan_int.h"
Go to the source code of this file.
Macros | |
#define | LEXRES_EOL 0 /* end of input */ |
#define | LEXRES_OK 1 /* OK completion of backslash argument */ |
#define | ECHO psqlscan_emit(cur_state, yytext, yyleng) |
Typedefs | |
typedef int | YYSTYPE |
Functions | |
static void | evaluate_backtick (PsqlScanState state) |
int | yylex (YYSTYPE *yylval_param, yyscan_t yyscanner) |
char * | psql_scan_slash_command (PsqlScanState state) |
char * | psql_scan_slash_option (PsqlScanState state, enum slash_option_type type, char *quote, bool semicolon) |
void | psql_scan_slash_command_end (PsqlScanState state) |
int | psql_scan_get_paren_depth (PsqlScanState state) |
void | psql_scan_set_paren_depth (PsqlScanState state, int depth) |
void | dequote_downcase_identifier (char *str, bool downcase, int encoding) |
Variables | |
static enum slash_option_type | option_type |
static char * | option_quote |
static int | unquoted_option_chars |
static int | backtick_start_offset |
#define ECHO psqlscan_emit(cur_state, yytext, yyleng) |
Definition at line 58 of file psqlscanslash.l.
#define LEXRES_EOL 0 /* end of input */ |
Definition at line 52 of file psqlscanslash.l.
#define LEXRES_OK 1 /* OK completion of backslash argument */ |
Definition at line 53 of file psqlscanslash.l.
typedef int YYSTYPE |
Definition at line 39 of file psqlscanslash.l.
void dequote_downcase_identifier | ( | char * | str, |
bool | downcase, | ||
int | encoding | ||
) |
Definition at line 743 of file psqlscanslash.l.
References encoding, pg_tolower(), PQmblenBounded(), and str.
Referenced by indexOfColumn(), and psql_scan_slash_option().
|
static |
Definition at line 779 of file psqlscanslash.l.
References appendBinaryPQExpBuffer(), backtick_start_offset, buf, PQExpBufferData::data, error(), fd(), fflush(), initPQExpBuffer(), PQExpBufferData::len, pg_log_error, PQExpBufferDataBroken, SetShellResultVariables(), and termPQExpBuffer().
int psql_scan_get_paren_depth | ( | PsqlScanState | state | ) |
Definition at line 711 of file psqlscanslash.l.
Referenced by save_query_text_state().
void psql_scan_set_paren_depth | ( | PsqlScanState | state, |
int | depth | ||
) |
Definition at line 720 of file psqlscanslash.l.
References Assert.
Referenced by discard_query_text().
char * psql_scan_slash_command | ( | PsqlScanState | state | ) |
Definition at line 480 of file psqlscanslash.l.
References Assert, PQExpBufferData::data, initPQExpBuffer(), psql_scan_reselect_sql_lexer(), and yylex().
Referenced by HandleSlashCmds().
void psql_scan_slash_command_end | ( | PsqlScanState | state | ) |
Definition at line 678 of file psqlscanslash.l.
References Assert, psql_scan_reselect_sql_lexer(), and yylex().
Referenced by HandleSlashCmds().
char * psql_scan_slash_option | ( | PsqlScanState | state, |
enum slash_option_type | type, | ||
char * | quote, | ||
bool | semicolon | ||
) |
Definition at line 539 of file psqlscanslash.l.
References Assert, PQExpBufferData::data, dequote_downcase_identifier(), exit(), fprintf, initPQExpBuffer(), PQExpBufferData::len, LEXRES_EOL, LEXRES_OK, option_quote, option_type, OT_SQLID, OT_SQLIDHACK, OT_WHOLE_LINE, pg_log_error, PG_USED_FOR_ASSERTS_ONLY, psql_scan_reselect_sql_lexer(), semicolon, termPQExpBuffer(), type, unquoted_option_chars, and yylex().
Referenced by exec_command_bind(), exec_command_bind_named(), exec_command_C(), exec_command_cd(), exec_command_close(), exec_command_copy(), exec_command_crosstabview(), exec_command_d(), exec_command_dfo(), exec_command_echo(), exec_command_edit(), exec_command_ef_ev(), exec_command_encoding(), exec_command_f(), exec_command_g(), exec_command_getenv(), exec_command_gset(), exec_command_help(), exec_command_include(), exec_command_list(), exec_command_lo(), exec_command_out(), exec_command_parse(), exec_command_password(), exec_command_prompt(), exec_command_pset(), exec_command_s(), exec_command_set(), exec_command_setenv(), exec_command_sf_sv(), exec_command_shell_escape(), exec_command_slash_command_help(), exec_command_t(), exec_command_T(), exec_command_timing(), exec_command_unset(), exec_command_watch(), exec_command_write(), exec_command_x(), exec_command_z(), gather_boolean_expression(), HandleSlashCmds(), ignore_slash_filepipe(), ignore_slash_options(), ignore_slash_whole_line(), process_command_g_options(), and read_connect_arg().
Definition at line 114 of file psqlscanslash.l.
Referenced by psql_scan_slash_command(), psql_scan_slash_command_end(), and psql_scan_slash_option().
|
static |
Definition at line 48 of file psqlscanslash.l.
Referenced by evaluate_backtick().
|
static |
Definition at line 46 of file psqlscanslash.l.
Referenced by psql_scan_slash_option().
|
static |
Definition at line 45 of file psqlscanslash.l.
Referenced by psql_scan_slash_option().
|
static |
Definition at line 47 of file psqlscanslash.l.
Referenced by psql_scan_slash_option().