PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | IfStackElem |
struct | ConditionalStackData |
Typedefs | |
typedef enum ifState | ifState |
typedef struct IfStackElem | IfStackElem |
typedef struct ConditionalStackData | ConditionalStackData |
typedef struct ConditionalStackData * | ConditionalStack |
Enumerations | |
enum | ifState { IFSTATE_NONE = 0 , IFSTATE_TRUE , IFSTATE_FALSE , IFSTATE_IGNORED , IFSTATE_ELSE_TRUE , IFSTATE_ELSE_FALSE } |
Functions | |
ConditionalStack | conditional_stack_create (void) |
void | conditional_stack_reset (ConditionalStack cstack) |
void | conditional_stack_destroy (ConditionalStack cstack) |
int | conditional_stack_depth (ConditionalStack cstack) |
void | conditional_stack_push (ConditionalStack cstack, ifState new_state) |
bool | conditional_stack_pop (ConditionalStack cstack) |
ifState | conditional_stack_peek (ConditionalStack cstack) |
bool | conditional_stack_poke (ConditionalStack cstack, ifState new_state) |
bool | conditional_stack_empty (ConditionalStack cstack) |
bool | conditional_active (ConditionalStack cstack) |
void | conditional_stack_set_query_len (ConditionalStack cstack, int len) |
int | conditional_stack_get_query_len (ConditionalStack cstack) |
void | conditional_stack_set_paren_depth (ConditionalStack cstack, int depth) |
int | conditional_stack_get_paren_depth (ConditionalStack cstack) |
typedef struct ConditionalStackData* ConditionalStack |
Definition at line 71 of file conditional.h.
typedef struct ConditionalStackData ConditionalStackData |
typedef struct IfStackElem IfStackElem |
enum ifState |
Enumerator | |
---|---|
IFSTATE_NONE | |
IFSTATE_TRUE | |
IFSTATE_FALSE | |
IFSTATE_IGNORED | |
IFSTATE_ELSE_TRUE | |
IFSTATE_ELSE_FALSE |
Definition at line 29 of file conditional.h.
bool conditional_active | ( | ConditionalStack | cstack | ) |
Definition at line 140 of file conditional.c.
References conditional_stack_peek(), IFSTATE_ELSE_TRUE, IFSTATE_NONE, and IFSTATE_TRUE.
Referenced by advanceConnectionState(), exec_command(), exec_command_if(), get_prompt(), HandleSlashCmds(), MainLoop(), and psql_get_variable().
ConditionalStack conditional_stack_create | ( | void | ) |
Definition at line 18 of file conditional.c.
References ConditionalStackData::head, and pg_malloc().
Referenced by CheckConditional(), main(), and MainLoop().
int conditional_stack_depth | ( | ConditionalStack | cstack | ) |
Definition at line 84 of file conditional.c.
References ConditionalStackData::head, and IfStackElem::next.
void conditional_stack_destroy | ( | ConditionalStack | cstack | ) |
Definition at line 43 of file conditional.c.
References conditional_stack_reset(), and free.
Referenced by CheckConditional(), main(), and MainLoop().
bool conditional_stack_empty | ( | ConditionalStack | cstack | ) |
Definition at line 130 of file conditional.c.
References ConditionalStackData::head.
Referenced by advanceConnectionState(), CheckConditional(), conditional_stack_get_paren_depth(), conditional_stack_get_query_len(), conditional_stack_peek(), conditional_stack_poke(), conditional_stack_set_paren_depth(), conditional_stack_set_query_len(), executeMetaCommand(), and MainLoop().
int conditional_stack_get_paren_depth | ( | ConditionalStack | cstack | ) |
Definition at line 184 of file conditional.c.
References conditional_stack_empty(), ConditionalStackData::head, and IfStackElem::paren_depth.
Referenced by discard_query_text().
int conditional_stack_get_query_len | ( | ConditionalStack | cstack | ) |
Definition at line 162 of file conditional.c.
References conditional_stack_empty(), ConditionalStackData::head, and IfStackElem::query_len.
Referenced by discard_query_text().
ifState conditional_stack_peek | ( | ConditionalStack | cstack | ) |
Definition at line 106 of file conditional.c.
References conditional_stack_empty(), ConditionalStackData::head, IfStackElem::if_state, and IFSTATE_NONE.
Referenced by advanceConnectionState(), CheckConditional(), conditional_active(), exec_command_elif(), exec_command_else(), exec_command_endif(), and executeMetaCommand().
bool conditional_stack_poke | ( | ConditionalStack | cstack, |
ifState | new_state | ||
) |
Definition at line 118 of file conditional.c.
References conditional_stack_empty(), ConditionalStackData::head, and IfStackElem::if_state.
Referenced by advanceConnectionState(), CheckConditional(), exec_command_elif(), exec_command_else(), exec_command_if(), and executeMetaCommand().
bool conditional_stack_pop | ( | ConditionalStack | cstack | ) |
Definition at line 69 of file conditional.c.
References free, ConditionalStackData::head, and IfStackElem::next.
Referenced by advanceConnectionState(), CheckConditional(), conditional_stack_reset(), exec_command_endif(), executeMetaCommand(), HandleSlashCmds(), and MainLoop().
void conditional_stack_push | ( | ConditionalStack | cstack, |
ifState | new_state | ||
) |
Definition at line 53 of file conditional.c.
References ConditionalStackData::head, IfStackElem::if_state, IfStackElem::next, IfStackElem::paren_depth, pg_malloc(), and IfStackElem::query_len.
Referenced by advanceConnectionState(), CheckConditional(), exec_command_if(), executeMetaCommand(), and HandleSlashCmds().
void conditional_stack_reset | ( | ConditionalStack | cstack | ) |
Definition at line 30 of file conditional.c.
References conditional_stack_pop().
Referenced by advanceConnectionState(), and conditional_stack_destroy().
void conditional_stack_set_paren_depth | ( | ConditionalStack | cstack, |
int | depth | ||
) |
Definition at line 173 of file conditional.c.
References Assert, conditional_stack_empty(), ConditionalStackData::head, and IfStackElem::paren_depth.
Referenced by save_query_text_state().
void conditional_stack_set_query_len | ( | ConditionalStack | cstack, |
int | len | ||
) |
Definition at line 151 of file conditional.c.
References Assert, conditional_stack_empty(), ConditionalStackData::head, len, and IfStackElem::query_len.
Referenced by save_query_text_state().