40 #define JUMBLE_SIZE 1024
55 const unsigned char *item,
Size size);
69 int query_location = *location;
73 if (query_location >= 0)
75 Assert(query_location <= strlen(query));
76 query += query_location;
79 query_len = strlen(query);
81 Assert(query_len <= strlen(query));
87 query_len = strlen(query);
95 query++, query_location++, query_len--;
99 *location = query_location;
133 if (query->queryId == UINT64CONST(0))
136 query->queryId = UINT64CONST(2);
138 query->queryId = UINT64CONST(1);
164 unsigned char *jumble = jstate->
jumble;
182 memcpy(jumble, &start_hash,
sizeof(start_hash));
183 jumble_len =
sizeof(start_hash);
186 memcpy(jumble + jumble_len, item, part_size);
187 jumble_len += part_size;
220 #define JUMBLE_NODE(item) \
221 _jumbleNode(jstate, (Node *) expr->item)
222 #define JUMBLE_LOCATION(location) \
223 RecordConstLocation(jstate, expr->location)
224 #define JUMBLE_FIELD(item) \
225 AppendJumble(jstate, (const unsigned char *) &(expr->item), sizeof(expr->item))
226 #define JUMBLE_FIELD_SINGLE(item) \
227 AppendJumble(jstate, (const unsigned char *) &(item), sizeof(item))
228 #define JUMBLE_STRING(str) \
231 AppendJumble(jstate, (const unsigned char *) (expr->str), strlen(expr->str) + 1); \
234 #include "queryjumblefuncs.funcs.c"
255 #include "queryjumblefuncs.switch.c"
317 elog(
ERROR,
"unrecognized list node type: %d",
350 elog(
ERROR,
"unrecognized node type: %d",
#define Assert(condition)
static Datum hash_any_extended(const unsigned char *k, int keylen, uint64 seed)
void * repalloc(void *pointer, Size size)
void check_stack_depth(void)
static uint64 DatumGetUInt64(Datum X)
static bool IsQueryIdEnabled(void)
JumbleState * JumbleQuery(Query *query)
#define JUMBLE_NODE(item)
static void _jumbleNode(JumbleState *jstate, Node *node)
static void AppendJumble(JumbleState *jstate, const unsigned char *item, Size size)
static void _jumbleVariableSetStmt(JumbleState *jstate, Node *node)
#define JUMBLE_LOCATION(location)
static void RecordConstLocation(JumbleState *jstate, int location)
static void _jumbleList(JumbleState *jstate, Node *node)
#define JUMBLE_STRING(str)
const char * CleanQuerytext(const char *query, int *location, int *len)
#define JUMBLE_FIELD_SINGLE(item)
static void _jumbleA_Const(JumbleState *jstate, Node *node)
#define JUMBLE_FIELD(item)
bool scanner_isspace(char ch)
static pg_noinline void Size size
int highest_extern_param_id