codekingpro/portable-devtools
116k
1/*-------------------------------------------------------------------------2 *3 * ruleutils.h4 * Declarations for ruleutils.c5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994, Regents of the University of California8 *9 * src/include/utils/ruleutils.h10 *11 *-------------------------------------------------------------------------12 */13#ifndef RULEUTILS_H14#define RULEUTILS_H15 16#include "nodes/nodes.h"17#include "nodes/parsenodes.h"18#include "nodes/pg_list.h"19 20struct Plan; /* avoid including plannodes.h here */21struct PlannedStmt;22 23/* Flags for pg_get_indexdef_columns_extended() */24#define RULE_INDEXDEF_PRETTY 0x0125#define RULE_INDEXDEF_KEYS_ONLY 0x02 /* ignore included attributes */26 27extern char *pg_get_indexdef_string(Oid indexrelid);28extern char *pg_get_indexdef_columns(Oid indexrelid, bool pretty);29extern char *pg_get_indexdef_columns_extended(Oid indexrelid,30 bits16 flags);31extern char *pg_get_querydef(Query *query, bool pretty);32 33extern char *pg_get_partkeydef_columns(Oid relid, bool pretty);34extern char *pg_get_partconstrdef_string(Oid partitionId, char *aliasname);35 36extern char *pg_get_constraintdef_command(Oid constraintId);37extern char *deparse_expression(Node *expr, List *dpcontext,38 bool forceprefix, bool showimplicit);39extern List *deparse_context_for(const char *aliasname, Oid relid);40extern List *deparse_context_for_plan_tree(struct PlannedStmt *pstmt,41 List *rtable_names);42extern List *set_deparse_context_plan(List *dpcontext,43 struct Plan *plan, List *ancestors);44extern List *select_rtable_names_for_explain(List *rtable,45 Bitmapset *rels_used);46extern char *generate_collation_name(Oid collid);47extern char *generate_opclass_name(Oid opclass);48extern char *get_range_partbound_string(List *bound_datums);49 50extern char *pg_get_statisticsobjdef_string(Oid statextid);51 52#endif /* RULEUTILS_H */53 