|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "pgpa_identifier.h"#include "parser/parsetree.h"#include "utils/builtins.h"#include "utils/lsyscache.h"
Go to the source code of this file.
Functions | |
| static Index * | pgpa_create_top_rti_map (Index rtable_length, List *rtable, List *appinfos) |
| static int | pgpa_occurrence_number (List *rtable, Index *top_rti_map, SubPlanRTInfo *rtinfo, Index rti) |
| const char * | pgpa_identifier_string (const pgpa_identifier *rid) |
| void | pgpa_compute_identifier_by_rti (PlannerInfo *root, Index rti, pgpa_identifier *rid) |
| int | pgpa_compute_identifiers_by_relids (PlannerInfo *root, Bitmapset *relids, pgpa_identifier *rids) |
| pgpa_identifier * | pgpa_create_identifiers_for_planned_stmt (PlannedStmt *pstmt) |
| Index | pgpa_compute_rti_from_identifier (int rtable_length, pgpa_identifier *rt_identifiers, pgpa_identifier *rid) |
| void pgpa_compute_identifier_by_rti | ( | PlannerInfo * | root, |
| Index | rti, | ||
| pgpa_identifier * | rid | ||
| ) |
Definition at line 115 of file pgpa_identifier.c.
References pgpa_identifier::alias_name, Assert, fb(), get_namespace_name_or_temp(), get_rel_name(), get_rel_namespace(), pgpa_identifier::occurrence, pgpa_identifier::partnsp, pgpa_identifier::partrel, pgpa_identifier::plan_name, root, rt_fetch, RTE_JOIN, and RTE_RELATION.
Referenced by pgpa_build_simple_rel(), pgpa_compute_identifiers_by_relids(), and pgpa_ri_checker_save().
| int pgpa_compute_identifiers_by_relids | ( | PlannerInfo * | root, |
| Bitmapset * | relids, | ||
| pgpa_identifier * | rids | ||
| ) |
Definition at line 220 of file pgpa_identifier.c.
References Assert, bms_next_member(), fb(), pgpa_compute_identifier_by_rti(), root, rt_fetch, and RTE_JOIN.
Referenced by pgpa_get_join_state().
| Index pgpa_compute_rti_from_identifier | ( | int | rtable_length, |
| pgpa_identifier * | rt_identifiers, | ||
| pgpa_identifier * | rid | ||
| ) |
Definition at line 352 of file pgpa_identifier.c.
References pgpa_identifier::alias_name, fb(), pgpa_identifier::occurrence, pgpa_identifier::partnsp, pgpa_identifier::partrel, pgpa_identifier::plan_name, and strings_equal_or_both_null().
Referenced by pgpa_walker_join_order_matches_member(), and pgpa_walker_would_advise().
| pgpa_identifier * pgpa_create_identifiers_for_planned_stmt | ( | PlannedStmt * | pstmt | ) |
Definition at line 244 of file pgpa_identifier.c.
References pgpa_identifier::alias_name, PlannedStmt::appendRelations, fb(), get_namespace_name_or_temp(), get_rel_name(), get_rel_namespace(), linitial, list_length(), list_nth(), pgpa_identifier::occurrence, palloc0_array, pgpa_identifier::partnsp, pgpa_identifier::partrel, pgpa_create_top_rti_map(), pgpa_occurrence_number(), pgpa_identifier::plan_name, rt_fetch, PlannedStmt::rtable, RTE_JOIN, and PlannedStmt::subrtinfos.
Referenced by pgpa_planner_shutdown(), and pgpa_ri_checker_validate().
|
static |
Definition at line 407 of file pgpa_identifier.c.
References fb(), foreach_node, palloc0_array, rt_fetch, and RTE_RELATION.
Referenced by pgpa_create_identifiers_for_planned_stmt().
| const char * pgpa_identifier_string | ( | const pgpa_identifier * | rid | ) |
Definition at line 80 of file pgpa_identifier.c.
References pgpa_identifier::alias_name, Assert, fb(), pgpa_identifier::occurrence, pgpa_identifier::partnsp, pgpa_identifier::partrel, pgpa_identifier::plan_name, psprintf(), and quote_identifier().
Referenced by pgpa_format_advice_target(), pgpa_output_advice(), pgpa_ri_checker_save(), and pgpa_ri_checker_validate().
|
static |
Definition at line 446 of file pgpa_identifier.c.
References fb(), rt_fetch, and RTE_JOIN.
Referenced by pgpa_create_identifiers_for_planned_stmt().