PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "nodes/queryjumble.h"
#include "parser/scansup.h"
#include "queryjumblefuncs.funcs.c"
#include "queryjumblefuncs.switch.c"
Go to the source code of this file.
Macros | |
#define | JUMBLE_SIZE 1024 /* query serialization buffer size */ |
#define | JUMBLE_NODE(item) _jumbleNode(jstate, (Node *) expr->item) |
#define | JUMBLE_LOCATION(location) RecordConstLocation(jstate, expr->location) |
#define | JUMBLE_FIELD(item) AppendJumble(jstate, (const unsigned char *) &(expr->item), sizeof(expr->item)) |
#define | JUMBLE_FIELD_SINGLE(item) AppendJumble(jstate, (const unsigned char *) &(item), sizeof(item)) |
#define | JUMBLE_STRING(str) |
Functions | |
static void | AppendJumble (JumbleState *jstate, const unsigned char *item, Size size) |
static void | RecordConstLocation (JumbleState *jstate, int location) |
static void | _jumbleNode (JumbleState *jstate, Node *node) |
static void | _jumbleA_Const (JumbleState *jstate, Node *node) |
static void | _jumbleList (JumbleState *jstate, Node *node) |
static void | _jumbleVariableSetStmt (JumbleState *jstate, Node *node) |
const char * | CleanQuerytext (const char *query, int *location, int *len) |
JumbleState * | JumbleQuery (Query *query) |
void | EnableQueryId (void) |
Variables | |
int | compute_query_id = COMPUTE_QUERY_ID_AUTO |
bool | query_id_enabled = false |
#define JUMBLE_FIELD | ( | item | ) | AppendJumble(jstate, (const unsigned char *) &(expr->item), sizeof(expr->item)) |
Definition at line 230 of file queryjumblefuncs.c.
#define JUMBLE_FIELD_SINGLE | ( | item | ) | AppendJumble(jstate, (const unsigned char *) &(item), sizeof(item)) |
Definition at line 232 of file queryjumblefuncs.c.
#define JUMBLE_LOCATION | ( | location | ) | RecordConstLocation(jstate, expr->location) |
Definition at line 228 of file queryjumblefuncs.c.
#define JUMBLE_NODE | ( | item | ) | _jumbleNode(jstate, (Node *) expr->item) |
Definition at line 226 of file queryjumblefuncs.c.
#define JUMBLE_SIZE 1024 /* query serialization buffer size */ |
Definition at line 40 of file queryjumblefuncs.c.
#define JUMBLE_STRING | ( | str | ) |
Definition at line 234 of file queryjumblefuncs.c.
|
static |
Definition at line 330 of file queryjumblefuncs.c.
References elog, ERROR, A_Const::isnull, JUMBLE_FIELD, JUMBLE_STRING, nodeTag, A_Const::val, and val.
|
static |
Definition at line 299 of file queryjumblefuncs.c.
References _jumbleNode(), elog, ERROR, JUMBLE_FIELD_SINGLE, lfirst, lfirst_int, lfirst_oid, lfirst_xid, and List::type.
Referenced by _jumbleNode().
|
static |
Definition at line 243 of file queryjumblefuncs.c.
References _jumbleList(), check_stack_depth(), elog, JumbleState::highest_extern_param_id, JUMBLE_FIELD, nodeTag, PARAM_EXTERN, Param::paramid, Param::paramkind, type, and WARNING.
Referenced by _jumbleList(), and JumbleQuery().
|
static |
Definition at line 364 of file queryjumblefuncs.c.
References generate_unaccent_rules::args, VariableSetStmt::jumble_args, JUMBLE_FIELD, JUMBLE_LOCATION, JUMBLE_NODE, JUMBLE_STRING, and name.
|
static |
Definition at line 168 of file queryjumblefuncs.c.
References DatumGetUInt64(), hash_any_extended(), JumbleState::jumble, JumbleState::jumble_len, JUMBLE_SIZE, Min, and size.
const char* CleanQuerytext | ( | const char * | query, |
int * | location, | ||
int * | len | ||
) |
Definition at line 67 of file queryjumblefuncs.c.
References Assert, len, and scanner_isspace().
Referenced by pgss_store(), and script_error_callback().
void EnableQueryId | ( | void | ) |
Definition at line 157 of file queryjumblefuncs.c.
References compute_query_id, COMPUTE_QUERY_ID_OFF, and query_id_enabled.
Referenced by _PG_init().
JumbleState* JumbleQuery | ( | Query * | query | ) |
Definition at line 112 of file queryjumblefuncs.c.
References _jumbleNode(), Assert, JumbleState::clocations, JumbleState::clocations_buf_size, JumbleState::clocations_count, DatumGetUInt64(), hash_any_extended(), JumbleState::highest_extern_param_id, IsQueryIdEnabled(), JumbleState::jumble, JumbleState::jumble_len, JUMBLE_SIZE, palloc(), and Query::utilityStmt.
Referenced by ExecCreateTableAs(), ExplainOneUtility(), ExplainQuery(), parse_analyze_fixedparams(), parse_analyze_varparams(), parse_analyze_withcb(), and PerformCursorOpen().
|
static |
Definition at line 205 of file queryjumblefuncs.c.
References JumbleState::clocations, JumbleState::clocations_buf_size, JumbleState::clocations_count, LocationLen::length, LocationLen::location, and repalloc().
int compute_query_id = COMPUTE_QUERY_ID_AUTO |
Definition at line 43 of file queryjumblefuncs.c.
Referenced by EnableQueryId(), ExplainPrintPlan(), and IsQueryIdEnabled().
Definition at line 52 of file queryjumblefuncs.c.
Referenced by EnableQueryId(), and IsQueryIdEnabled().