58#define ECHO psqlscan_emit(cur_state, yytext, yyleng)
static int backtick_start_offset
static int unquoted_option_chars
static char * option_quote
static enum slash_option_type option_type
static void evaluate_backtick(PsqlScanState state)
68%option never-interactive
74%option prefix="slash_yy"
80%option extra-type="PsqlScanState"
106xeoctesc [\\][0-7]{1,3}
107xehexesc [\\]x[0-9A-Fa-f]{1,2}
108xqdouble {quote}{quote}
110variable_char [A-Za-z\200-\377_0-9]
119 PQExpBuffer output_buf =
cur_state->output_buf;
128 BEGIN(cur_state->start_state);
void appendPQExpBufferStr(PQExpBuffer str, const char *data)
char * psqlscan_extract_substring(PsqlScanState state, const char *txt, int len)
void psqlscan_escape_variable(PsqlScanState state, const char *txt, int len, PsqlScanQuoteType quote)
275:\"{variable_char}+\" {
282:\{\?{variable_char}+\} {
void psqlscan_test_variable(PsqlScanState state, const char *txt, int len)
300:\{\?{variable_char}* {
void appendPQExpBufferChar(PQExpBuffer str, char ch)
void psqlscan_emit(PsqlScanState state, const char *txt, int len)
bool conditional_active(ConditionalStack cstack)
428 if (output_buf->len > 0)
void psqlscan_select_top_buffer(PsqlScanState state)
void psqlscan_pop_buffer_stack(PsqlScanState state)
645 while (
mybuf.len > 0 &&
664 if (
mybuf.len == 0 && *quote == 0)
713 return state->paren_depth;
723 state->paren_depth = depth;
839 output_buf->
data[output_buf->
len] =
'\0';
void SetShellResultVariables(int wait_result)
#define PG_USED_FOR_ASSERTS_ONLY
#define Assert(condition)
#define fprintf(file, fmt, msg)
int PQmblenBounded(const char *s, int encoding)
#define pg_log_error(...)
static char buf[DEFAULT_XLOG_SEG_SIZE]
unsigned char pg_tolower(unsigned char ch)
void initPQExpBuffer(PQExpBuffer str)
void appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen)
void termPQExpBuffer(PQExpBuffer str)
#define PQExpBufferDataBroken(buf)
static int fd(const char *x, int i)
void psql_scan_reselect_sql_lexer(PsqlScanState state)
void psql_scan_slash_command_end(PsqlScanState state)
void psql_scan_set_paren_depth(PsqlScanState state, int depth)
void dequote_downcase_identifier(char *str, bool downcase, int encoding)
char * psql_scan_slash_option(PsqlScanState state, enum slash_option_type type, char *quote, bool semicolon)
int psql_scan_get_paren_depth(PsqlScanState state)
char * psql_scan_slash_command(PsqlScanState state)