PostgreSQL Source Code git master
|
#include "fe_utils/psqlscan.h"
Go to the source code of this file.
Data Structures | |
struct | StackElem |
struct | PsqlScanStateData |
Macros | |
#define | YY_TYPEDEF_YY_BUFFER_STATE |
#define | YY_TYPEDEF_YY_SCANNER_T |
Typedefs | |
typedef struct yy_buffer_state * | YY_BUFFER_STATE |
typedef void * | yyscan_t |
typedef struct StackElem | StackElem |
typedef struct PsqlScanStateData | PsqlScanStateData |
Functions | |
void | psqlscan_push_new_buffer (PsqlScanState state, const char *newstr, const char *varname) |
void | psqlscan_pop_buffer_stack (PsqlScanState state) |
void | psqlscan_select_top_buffer (PsqlScanState state) |
bool | psqlscan_var_is_current_source (PsqlScanState state, const char *varname) |
YY_BUFFER_STATE | psqlscan_prepare_buffer (PsqlScanState state, const char *txt, int len, char **txtcopy) |
void | psqlscan_emit (PsqlScanState state, const char *txt, int len) |
char * | psqlscan_extract_substring (PsqlScanState state, const char *txt, int len) |
void | psqlscan_escape_variable (PsqlScanState state, const char *txt, int len, PsqlScanQuoteType quote) |
void | psqlscan_test_variable (PsqlScanState state, const char *txt, int len) |
#define YY_TYPEDEF_YY_BUFFER_STATE |
Definition at line 55 of file psqlscan_int.h.
#define YY_TYPEDEF_YY_SCANNER_T |
Definition at line 59 of file psqlscan_int.h.
typedef struct PsqlScanStateData PsqlScanStateData |
typedef struct yy_buffer_state* YY_BUFFER_STATE |
Definition at line 56 of file psqlscan_int.h.
typedef void* yyscan_t |
Definition at line 60 of file psqlscan_int.h.
void psqlscan_emit | ( | PsqlScanState | state, |
const char * | txt, | ||
int | len | ||
) |
Definition at line 1463 of file psqlscan.l.
References appendBinaryPQExpBuffer(), appendPQExpBufferChar(), i, and len.
Referenced by psqlscan_escape_variable(), and psqlscan_test_variable().
void psqlscan_escape_variable | ( | PsqlScanState | state, |
const char * | txt, | ||
int | len, | ||
PsqlScanQuoteType | quote | ||
) |
Definition at line 1531 of file psqlscan.l.
References appendPQExpBufferStr(), free, len, psqlscan_emit(), psqlscan_extract_substring(), and value.
char * psqlscan_extract_substring | ( | PsqlScanState | state, |
const char * | txt, | ||
int | len | ||
) |
Definition at line 1495 of file psqlscan.l.
References i, len, and pg_malloc().
Referenced by psqlscan_escape_variable(), and psqlscan_test_variable().
void psqlscan_pop_buffer_stack | ( | PsqlScanState | state | ) |
Definition at line 1359 of file psqlscan.l.
References StackElem::buf, StackElem::bufstring, free, StackElem::next, StackElem::origstring, and StackElem::varname.
Referenced by psql_scan_finish().
YY_BUFFER_STATE psqlscan_prepare_buffer | ( | PsqlScanState | state, |
const char * | txt, | ||
int | len, | ||
char ** | txtcopy | ||
) |
Definition at line 1422 of file psqlscan.l.
References i, len, pg_malloc(), and PQmblen().
Referenced by psql_scan_setup(), and psqlscan_push_new_buffer().
void psqlscan_push_new_buffer | ( | PsqlScanState | state, |
const char * | newstr, | ||
const char * | varname | ||
) |
Definition at line 1320 of file psqlscan.l.
References StackElem::buf, StackElem::bufstring, StackElem::next, StackElem::origstring, pg_malloc(), pg_strdup(), psqlscan_prepare_buffer(), and StackElem::varname.
void psqlscan_select_top_buffer | ( | PsqlScanState | state | ) |
Definition at line 1377 of file psqlscan.l.
References StackElem::buf, StackElem::bufstring, and StackElem::origstring.
void psqlscan_test_variable | ( | PsqlScanState | state, |
const char * | txt, | ||
int | len | ||
) |
Definition at line 1560 of file psqlscan.l.
References free, len, PQUOTE_PLAIN, psqlscan_emit(), psqlscan_extract_substring(), and value.
bool psqlscan_var_is_current_source | ( | PsqlScanState | state, |
const char * | varname | ||
) |
Definition at line 1400 of file psqlscan.l.
References StackElem::next, and StackElem::varname.