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-2024, 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 /* Flags for pg_get_indexdef_columns_extended() */
24 #define RULE_INDEXDEF_PRETTY 0x01
25 #define RULE_INDEXDEF_KEYS_ONLY 0x02 /* ignore included attributes */
26 
27 extern char *pg_get_indexdef_string(Oid indexrelid);
28 extern char *pg_get_indexdef_columns(Oid indexrelid, bool pretty);
29 extern char *pg_get_indexdef_columns_extended(Oid indexrelid,
30  bits16 flags);
31 extern char *pg_get_querydef(Query *query, bool pretty);
32 
33 extern char *pg_get_partkeydef_columns(Oid relid, bool pretty);
34 extern char *pg_get_partconstrdef_string(Oid partitionId, char *aliasname);
35 
36 extern char *pg_get_constraintdef_command(Oid constraintId);
37 extern char *deparse_expression(Node *expr, List *dpcontext,
38  bool forceprefix, bool showimplicit);
39 extern List *deparse_context_for(const char *aliasname, Oid relid);
40 extern List *deparse_context_for_plan_tree(struct PlannedStmt *pstmt,
41  List *rtable_names);
42 extern List *set_deparse_context_plan(List *dpcontext,
43  struct Plan *plan, List *ancestors);
45  Bitmapset *rels_used);
46 extern char *generate_collation_name(Oid collid);
47 extern char *generate_opclass_name(Oid opclass);
48 extern char *get_range_partbound_string(List *bound_datums);
49 
50 extern char *pg_get_statisticsobjdef_string(Oid statextid);
51 
52 extern char *get_list_partvalue_string(Const *val);
53 
54 #endif /* RULEUTILS_H */
uint16 bits16
Definition: c.h:514
Oid collid
long val
Definition: informix.c:670
#define plan(x)
Definition: pg_regress.c:162
unsigned int Oid
Definition: postgres_ext.h:31
char * deparse_expression(Node *expr, List *dpcontext, bool forceprefix, bool showimplicit)
Definition: ruleutils.c:3625
char * pg_get_constraintdef_command(Oid constraintId)
Definition: ruleutils.c:2168
char * generate_opclass_name(Oid opclass)
Definition: ruleutils.c:12493
List * deparse_context_for_plan_tree(struct PlannedStmt *pstmt, List *rtable_names)
Definition: ruleutils.c:3730
List * deparse_context_for(const char *aliasname, Oid relid)
Definition: ruleutils.c:3685
List * set_deparse_context_plan(List *dpcontext, struct Plan *plan, List *ancestors)
Definition: ruleutils.c:3799
char * pg_get_statisticsobjdef_string(Oid statextid)
Definition: ruleutils.c:1611
char * generate_collation_name(Oid collid)
Definition: ruleutils.c:13135
List * select_rtable_names_for_explain(List *rtable, Bitmapset *rels_used)
Definition: ruleutils.c:3822
char * pg_get_partconstrdef_string(Oid partitionId, char *aliasname)
Definition: ruleutils.c:2112
char * pg_get_partkeydef_columns(Oid relid, bool pretty)
Definition: ruleutils.c:1908
char * pg_get_indexdef_columns_extended(Oid indexrelid, bits16 flags)
Definition: ruleutils.c:1233
char * get_list_partvalue_string(Const *val)
Definition: ruleutils.c:13308
char * pg_get_querydef(Query *query, bool pretty)
Definition: ruleutils.c:1572
char * pg_get_indexdef_columns(Oid indexrelid, bool pretty)
Definition: ruleutils.c:1219
char * get_range_partbound_string(List *bound_datums)
Definition: ruleutils.c:13268
char * pg_get_indexdef_string(Oid indexrelid)
Definition: ruleutils.c:1209
Definition: pg_list.h:54
Definition: nodes.h:129
List * rtable
Definition: plannodes.h:72