40 #define JUMBLE_SIZE 1024
55 const unsigned char *item,
Size size);
68 int query_location = *location;
72 if (query_location >= 0)
74 Assert(query_location <= strlen(query));
75 query += query_location;
78 query_len = strlen(query);
80 Assert(query_len <= strlen(query));
86 query_len = strlen(query);
94 query++, query_location++, query_len--;
98 *location = query_location;
132 if (query->queryId == UINT64CONST(0))
135 query->queryId = UINT64CONST(2);
137 query->queryId = UINT64CONST(1);
163 unsigned char *jumble = jstate->
jumble;
181 memcpy(jumble, &start_hash,
sizeof(start_hash));
182 jumble_len =
sizeof(start_hash);
185 memcpy(jumble + jumble_len, item, part_size);
186 jumble_len += part_size;
219 #define JUMBLE_NODE(item) \
220 _jumbleNode(jstate, (Node *) expr->item)
221 #define JUMBLE_LOCATION(location) \
222 RecordConstLocation(jstate, expr->location)
223 #define JUMBLE_FIELD(item) \
224 AppendJumble(jstate, (const unsigned char *) &(expr->item), sizeof(expr->item))
225 #define JUMBLE_FIELD_SINGLE(item) \
226 AppendJumble(jstate, (const unsigned char *) &(item), sizeof(item))
227 #define JUMBLE_STRING(str) \
230 AppendJumble(jstate, (const unsigned char *) (expr->str), strlen(expr->str) + 1); \
233 #include "queryjumblefuncs.funcs.c"
254 #include "queryjumblefuncs.switch.c"
316 elog(
ERROR,
"unrecognized list node type: %d",
349 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)
static void _jumbleNode(JumbleState *jstate, Node *node)
static void AppendJumble(JumbleState *jstate, const unsigned char *item, Size size)
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