34 return "BITMAP_HEAP_SCAN";
36 return "FOREIGN_JOIN";
40 return "GATHER_MERGE";
44 return "INDEX_ONLY_SCAN";
50 return "MERGE_JOIN_MATERIALIZE";
52 return "MERGE_JOIN_PLAIN";
54 return "NESTED_LOOP_MATERIALIZE";
56 return "NESTED_LOOP_MEMOIZE";
58 return "NESTED_LOOP_PLAIN";
62 return "PARTITIONWISE";
64 return "SEMIJOIN_NON_UNIQUE";
66 return "SEMIJOIN_UNIQUE";
92 if (
strcmp(tag,
"bitmap_heap_scan") == 0)
96 if (
strcmp(tag,
"foreign_join") == 0)
100 if (
strcmp(tag,
"gather") == 0)
102 if (
strcmp(tag,
"gather_merge") == 0)
106 if (
strcmp(tag,
"hash_join") == 0)
110 if (
strcmp(tag,
"index_scan") == 0)
112 if (
strcmp(tag,
"index_only_scan") == 0)
116 if (
strcmp(tag,
"join_order") == 0)
120 if (
strcmp(tag,
"merge_join_materialize") == 0)
122 if (
strcmp(tag,
"merge_join_plain") == 0)
126 if (
strcmp(tag,
"nested_loop_materialize") == 0)
128 if (
strcmp(tag,
"nested_loop_memoize") == 0)
130 if (
strcmp(tag,
"nested_loop_plain") == 0)
132 if (
strcmp(tag,
"no_gather") == 0)
136 if (
strcmp(tag,
"partitionwise") == 0)
140 if (
strcmp(tag,
"semijoin_non_unique") == 0)
142 if (
strcmp(tag,
"semijoin_unique") == 0)
144 if (
strcmp(tag,
"seq_scan") == 0)
148 if (
strcmp(tag,
"tid_scan") == 0)
#define Assert(condition)
#define palloc0_array(type, count)
#define foreach_ptr(type, var, lst)
char * pgpa_cstring_advice_tag(pgpa_advice_tag_type advice_tag)
bool pgpa_identifier_matches_target(pgpa_identifier *rid, pgpa_advice_target *target)
void pgpa_format_advice_target(StringInfo str, pgpa_advice_target *target)
static bool pgpa_identifiers_cover_target(int nrids, pgpa_identifier *rids, pgpa_advice_target *target, bool *rids_used)
pgpa_advice_tag_type pgpa_parse_advice_tag(const char *tag, bool *fail)
void pgpa_format_index_target(StringInfo str, pgpa_index_target *itarget)
bool pgpa_index_targets_equal(pgpa_index_target *i1, pgpa_index_target *i2)
pgpa_itm_type pgpa_identifiers_match_target(int nrids, pgpa_identifier *rids, pgpa_advice_target *target)
@ PGPA_TAG_NESTED_LOOP_MATERIALIZE
@ PGPA_TAG_MERGE_JOIN_PLAIN
@ PGPA_TAG_NESTED_LOOP_MEMOIZE
@ PGPA_TAG_SEMIJOIN_NON_UNIQUE
@ PGPA_TAG_BITMAP_HEAP_SCAN
@ PGPA_TAG_INDEX_ONLY_SCAN
@ PGPA_TAG_SEMIJOIN_UNIQUE
@ PGPA_TAG_NESTED_LOOP_PLAIN
@ PGPA_TAG_MERGE_JOIN_MATERIALIZE
@ PGPA_TARGET_UNORDERED_LIST
@ PGPA_ITM_KEYS_ARE_SUBSET
@ PGPA_ITM_TARGETS_ARE_SUBSET
const char * pgpa_identifier_string(const pgpa_identifier *rid)
static bool strings_equal_or_both_null(const char *a, const char *b)
const char * quote_identifier(const char *ident)
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)