PostgreSQL Source Code git master
|
Go to the source code of this file.
Macros | |
#define | RULE_INDEXDEF_PRETTY 0x01 |
#define | RULE_INDEXDEF_KEYS_ONLY 0x02 /* ignore included attributes */ |
Functions | |
char * | pg_get_indexdef_string (Oid indexrelid) |
char * | pg_get_indexdef_columns (Oid indexrelid, bool pretty) |
char * | pg_get_indexdef_columns_extended (Oid indexrelid, bits16 flags) |
char * | pg_get_querydef (Query *query, bool pretty) |
char * | pg_get_partkeydef_columns (Oid relid, bool pretty) |
char * | pg_get_partconstrdef_string (Oid partitionId, char *aliasname) |
char * | pg_get_constraintdef_command (Oid constraintId) |
char * | deparse_expression (Node *expr, List *dpcontext, bool forceprefix, bool showimplicit) |
List * | deparse_context_for (const char *aliasname, Oid relid) |
List * | deparse_context_for_plan_tree (struct PlannedStmt *pstmt, List *rtable_names) |
List * | set_deparse_context_plan (List *dpcontext, struct Plan *plan, List *ancestors) |
List * | select_rtable_names_for_explain (List *rtable, Bitmapset *rels_used) |
char * | get_window_frame_options_for_explain (int frameOptions, Node *startOffset, Node *endOffset, List *dpcontext, bool forceprefix) |
char * | generate_collation_name (Oid collid) |
char * | generate_opclass_name (Oid opclass) |
char * | get_range_partbound_string (List *bound_datums) |
char * | pg_get_statisticsobjdef_string (Oid statextid) |
#define RULE_INDEXDEF_KEYS_ONLY 0x02 /* ignore included attributes */ |
Definition at line 25 of file ruleutils.h.
#define RULE_INDEXDEF_PRETTY 0x01 |
Definition at line 24 of file ruleutils.h.
Definition at line 3708 of file ruleutils.c.
References AccessShareLock, deparse_namespace::appendrels, deparse_namespace::ctes, RangeTblEntry::inh, list_make1, makeAlias(), makeNode, NIL, palloc0(), deparse_namespace::rtable, RTE_RELATION, RangeTblEntry::rtekind, set_rtable_names(), set_simple_column_names(), and deparse_namespace::subplans.
Referenced by pg_get_constraintdef_worker(), pg_get_expr_worker(), pg_get_indexdef_worker(), pg_get_partconstrdef_string(), pg_get_partition_constraintdef(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_statisticsobjdef_expressions(), transformPartitionBound(), and transformPartitionRangeBounds().
List * deparse_context_for_plan_tree | ( | struct PlannedStmt * | pstmt, |
List * | rtable_names | ||
) |
Definition at line 3753 of file ruleutils.c.
References PlannedStmt::appendRelations, deparse_namespace::appendrels, Assert(), AppendRelInfo::child_relid, deparse_namespace::ctes, lfirst_node, list_length(), list_make1, NIL, palloc0(), deparse_namespace::rtable, PlannedStmt::rtable, deparse_namespace::rtable_names, set_simple_column_names(), deparse_namespace::subplans, and PlannedStmt::subplans.
Referenced by ExplainPrintPlan().
Definition at line 3645 of file ruleutils.c.
References deparse_expression_pretty().
Referenced by AlterDomainDefault(), DefineDomain(), pg_get_function_arg_default(), pg_get_partconstrdef_string(), print_function_arguments(), show_expression(), show_grouping_set_keys(), show_memoize_info(), show_plan_tlist(), show_sort_group_keys(), show_tablesample(), show_window_keys(), transformPartitionBound(), and transformPartitionRangeBounds().
char * generate_collation_name | ( | Oid | collid | ) |
Definition at line 13533 of file ruleutils.c.
References CollationIsVisible(), collid, elog, ERROR, get_namespace_name_or_temp(), GETSTRUCT(), HeapTupleIsValid, NameStr, ObjectIdGetDatum(), quote_qualified_identifier(), ReleaseSysCache(), and SearchSysCache1().
Referenced by get_const_collation(), get_from_clause_coldeflist(), get_rule_expr(), pg_collation_for(), pg_get_indexdef_worker(), and pg_get_partkeydef_worker().
char * generate_opclass_name | ( | Oid | opclass | ) |
Definition at line 12889 of file ruleutils.c.
References buf, get_opclass_name(), initStringInfo(), and InvalidOid.
Referenced by index_opclass_options().
char * get_range_partbound_string | ( | List * | bound_datums | ) |
Definition at line 13666 of file ruleutils.c.
References appendStringInfoChar(), appendStringInfoString(), deparse_context::buf, buf, castNode, get_const_expr(), PartitionRangeDatum::kind, lfirst_node, makeStringInfo(), PARTITION_RANGE_DATUM_MAXVALUE, PARTITION_RANGE_DATUM_MINVALUE, val, and PartitionRangeDatum::value.
Referenced by check_new_partition_bound(), and get_rule_expr().
char * get_window_frame_options_for_explain | ( | int | frameOptions, |
Node * | startOffset, | ||
Node * | endOffset, | ||
List * | dpcontext, | ||
bool | forceprefix | ||
) |
Definition at line 6897 of file ruleutils.c.
References deparse_context::appendparents, deparse_context::buf, buf, deparse_context::colNamesVisible, get_window_frame_options(), deparse_context::indentLevel, deparse_context::inGroupBy, initStringInfo(), deparse_context::namespaces, NIL, deparse_context::prettyFlags, deparse_context::resultDesc, deparse_context::targetList, deparse_context::varInOrderBy, deparse_context::varprefix, deparse_context::windowClause, WRAP_COLUMN_DEFAULT, and deparse_context::wrapColumn.
Referenced by show_window_def().
char * pg_get_constraintdef_command | ( | Oid | constraintId | ) |
Definition at line 2184 of file ruleutils.c.
References pg_get_constraintdef_worker().
Referenced by RememberConstraintForRebuilding().
char * pg_get_indexdef_columns | ( | Oid | indexrelid, |
bool | pretty | ||
) |
Definition at line 1235 of file ruleutils.c.
References GET_PRETTY_FLAGS, and pg_get_indexdef_worker().
Referenced by BuildIndexValueDescription().
Definition at line 1249 of file ruleutils.c.
References GET_PRETTY_FLAGS, pg_get_indexdef_worker(), RULE_INDEXDEF_KEYS_ONLY, and RULE_INDEXDEF_PRETTY.
Referenced by gist_page_items().
char * pg_get_indexdef_string | ( | Oid | indexrelid | ) |
Definition at line 1225 of file ruleutils.c.
References pg_get_indexdef_worker().
Referenced by RememberIndexForRebuilding().
char * pg_get_partconstrdef_string | ( | Oid | partitionId, |
char * | aliasname | ||
) |
Definition at line 2128 of file ruleutils.c.
References deparse_context_for(), deparse_expression(), and get_partition_qual_relid().
Referenced by RI_PartitionRemove_Check().
char * pg_get_partkeydef_columns | ( | Oid | relid, |
bool | pretty | ||
) |
Definition at line 1924 of file ruleutils.c.
References GET_PRETTY_FLAGS, and pg_get_partkeydef_worker().
Referenced by ExecBuildSlotPartitionKeyDescription().
char * pg_get_querydef | ( | Query * | query, |
bool | pretty | ||
) |
Definition at line 1588 of file ruleutils.c.
References buf, GET_PRETTY_FLAGS, get_query_def(), initStringInfo(), NIL, and WRAP_COLUMN_DEFAULT.
char * pg_get_statisticsobjdef_string | ( | Oid | statextid | ) |
Definition at line 1627 of file ruleutils.c.
References pg_get_statisticsobj_worker().
Referenced by RememberStatisticsForRebuilding().
Definition at line 3855 of file ruleutils.c.
References deparse_namespace::appendrels, deparse_namespace::ctes, NIL, deparse_namespace::rtable, deparse_namespace::rtable_names, set_rtable_names(), and deparse_namespace::subplans.
Referenced by ExplainPrintPlan().
Definition at line 3825 of file ruleutils.c.
References deparse_namespace::ancestors, Assert(), IsA, linitial, list_length(), plan, deparse_namespace::ret_new_alias, deparse_namespace::ret_old_alias, and set_deparse_plan().
Referenced by show_expression(), show_grouping_sets(), show_memoize_info(), show_plan_tlist(), show_sort_group_keys(), show_tablesample(), show_window_def(), and show_window_keys().