#ifndef QUERYJUMBLE_H
#define QUERYJUMBLE_H
#include "nodes/parsenodes.h"
typedef struct LocationLen
{
int location;
int length;
} LocationLen;
typedef struct JumbleState
{
unsigned char *jumble;
Size jumble_len;
LocationLen *clocations;
int clocations_buf_size;
int clocations_count;
int highest_extern_param_id;
} JumbleState;
enum ComputeQueryIdType
{
COMPUTE_QUERY_ID_OFF,
COMPUTE_QUERY_ID_ON,
COMPUTE_QUERY_ID_AUTO,
COMPUTE_QUERY_ID_REGRESS,
};
extern PGDLLIMPORT int compute_query_id;
extern const char *CleanQuerytext(const char *query, int *location, int *len);
extern JumbleState *JumbleQuery(Query *query);
extern void EnableQueryId(void);
extern PGDLLIMPORT bool query_id_enabled;
static inline bool
IsQueryIdEnabled(void)
{
if (compute_query_id == COMPUTE_QUERY_ID_OFF)
return false;
if (compute_query_id == COMPUTE_QUERY_ID_ON)
return true;
return query_id_enabled;
}
#endif