PostgreSQL Source Code  git master
ruleutils.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * ruleutils.h
4  * Declarations for ruleutils.c
5  *
6  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * src/include/utils/ruleutils.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef RULEUTILS_H
14 #define RULEUTILS_H
15 
16 #include "nodes/nodes.h"
17 #include "nodes/parsenodes.h"
18 #include "nodes/pg_list.h"
19 
20 struct Plan; /* avoid including plannodes.h here */
21 struct PlannedStmt;
22 
23 
24 extern char *pg_get_indexdef_string(Oid indexrelid);
25 extern char *pg_get_indexdef_columns(Oid indexrelid, bool pretty);
26 extern char *pg_get_querydef(Query *query, bool pretty);
27 
28 extern char *pg_get_partkeydef_columns(Oid relid, bool pretty);
29 extern char *pg_get_partconstrdef_string(Oid partitionId, char *aliasname);
30 
31 extern char *pg_get_constraintdef_command(Oid constraintId);
32 extern char *deparse_expression(Node *expr, List *dpcontext,
33  bool forceprefix, bool showimplicit);
34 extern List *deparse_context_for(const char *aliasname, Oid relid);
35 extern List *deparse_context_for_plan_tree(struct PlannedStmt *pstmt,
36  List *rtable_names);
37 extern List *set_deparse_context_plan(List *dpcontext,
38  struct Plan *plan, List *ancestors);
40  Bitmapset *rels_used);
41 extern char *generate_collation_name(Oid collid);
42 extern char *generate_opclass_name(Oid opclass);
43 extern char *get_range_partbound_string(List *bound_datums);
44 
45 extern char *pg_get_statisticsobjdef_string(Oid statextid);
46 
47 #endif /* RULEUTILS_H */
unsigned int Oid
Definition: postgres_ext.h:31
char * deparse_expression(Node *expr, List *dpcontext, bool forceprefix, bool showimplicit)
Definition: ruleutils.c:3610
char * pg_get_constraintdef_command(Oid constraintId)
Definition: ruleutils.c:2149
char * generate_opclass_name(Oid opclass)
Definition: ruleutils.c:12062
List * deparse_context_for_plan_tree(struct PlannedStmt *pstmt, List *rtable_names)
Definition: ruleutils.c:3715
List * deparse_context_for(const char *aliasname, Oid relid)
Definition: ruleutils.c:3670
List * set_deparse_context_plan(List *dpcontext, struct Plan *plan, List *ancestors)
Definition: ruleutils.c:3784
char * pg_get_statisticsobjdef_string(Oid statextid)
Definition: ruleutils.c:1580
char * generate_collation_name(Oid collid)
Definition: ruleutils.c:12704
List * select_rtable_names_for_explain(List *rtable, Bitmapset *rels_used)
Definition: ruleutils.c:3807
char * pg_get_partconstrdef_string(Oid partitionId, char *aliasname)
Definition: ruleutils.c:2093
char * pg_get_partkeydef_columns(Oid relid, bool pretty)
Definition: ruleutils.c:1884
char * pg_get_querydef(Query *query, bool pretty)
Definition: ruleutils.c:1541
char * pg_get_indexdef_columns(Oid indexrelid, bool pretty)
Definition: ruleutils.c:1196
char * get_range_partbound_string(List *bound_datums)
Definition: ruleutils.c:12838
char * pg_get_indexdef_string(Oid indexrelid)
Definition: ruleutils.c:1186
Definition: pg_list.h:51
Definition: nodes.h:574
List * rtable
Definition: plannodes.h:67