|
PostgreSQL Source Code git master
|
#include "fe_utils/psqlscan.h"

Go to the source code of this file.
Data Structures | |
| struct | StackElem |
| struct | PsqlScanStateData |
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) |
| typedef struct PsqlScanStateData PsqlScanStateData |
| typedef struct yy_buffer_state* YY_BUFFER_STATE |
Definition at line 54 of file psqlscan_int.h.
| typedef void* yyscan_t |
Definition at line 55 of file psqlscan_int.h.
| void psqlscan_emit | ( | PsqlScanState | state, |
| const char * | txt, | ||
| int | len | ||
| ) |
Definition at line 1517 of file psqlscan.l.
References appendBinaryPQExpBuffer(), appendPQExpBufferChar(), i, and len.
Referenced by psqlscan_escape_variable().
| void psqlscan_escape_variable | ( | PsqlScanState | state, |
| const char * | txt, | ||
| int | len, | ||
| PsqlScanQuoteType | quote | ||
| ) |
Definition at line 1585 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 1549 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 1413 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 1476 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 1374 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 1431 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 1614 of file psqlscan.l.
References appendPQExpBufferStr(), free, len, PQUOTE_PLAIN, psqlscan_extract_substring(), and value.
| bool psqlscan_var_is_current_source | ( | PsqlScanState | state, |
| const char * | varname | ||
| ) |
Definition at line 1454 of file psqlscan.l.
References StackElem::next, and StackElem::varname.