PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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-2025, 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
20struct Plan; /* avoid including plannodes.h here */
21struct 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
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);
41 List *rtable_names);
42extern List *set_deparse_context_plan(List *dpcontext,
43 struct Plan *plan, List *ancestors);
45 Bitmapset *rels_used);
46extern char *get_window_frame_options_for_explain(int frameOptions,
47 Node *startOffset,
48 Node *endOffset,
49 List *dpcontext,
50 bool forceprefix);
52extern char *generate_opclass_name(Oid opclass);
53extern char *get_range_partbound_string(List *bound_datums);
54
55extern char *pg_get_statisticsobjdef_string(Oid statextid);
56
57#endif /* RULEUTILS_H */
uint16 bits16
Definition: c.h:510
Oid collid
#define plan(x)
Definition: pg_regress.c:161
unsigned int Oid
Definition: postgres_ext.h:30
char * pg_get_statisticsobjdef_string(Oid statextid)
Definition: ruleutils.c:1627
List * deparse_context_for_plan_tree(struct PlannedStmt *pstmt, List *rtable_names)
Definition: ruleutils.c:3753
char * pg_get_partkeydef_columns(Oid relid, bool pretty)
Definition: ruleutils.c:1924
List * deparse_context_for(const char *aliasname, Oid relid)
Definition: ruleutils.c:3708
char * pg_get_indexdef_columns(Oid indexrelid, bool pretty)
Definition: ruleutils.c:1235
char * pg_get_indexdef_columns_extended(Oid indexrelid, bits16 flags)
Definition: ruleutils.c:1249
List * set_deparse_context_plan(List *dpcontext, struct Plan *plan, List *ancestors)
Definition: ruleutils.c:3825
char * pg_get_indexdef_string(Oid indexrelid)
Definition: ruleutils.c:1225
char * pg_get_querydef(Query *query, bool pretty)
Definition: ruleutils.c:1588
List * select_rtable_names_for_explain(List *rtable, Bitmapset *rels_used)
Definition: ruleutils.c:3855
char * generate_collation_name(Oid collid)
Definition: ruleutils.c:13533
char * pg_get_constraintdef_command(Oid constraintId)
Definition: ruleutils.c:2184
char * pg_get_partconstrdef_string(Oid partitionId, char *aliasname)
Definition: ruleutils.c:2128
char * get_window_frame_options_for_explain(int frameOptions, Node *startOffset, Node *endOffset, List *dpcontext, bool forceprefix)
Definition: ruleutils.c:6897
char * deparse_expression(Node *expr, List *dpcontext, bool forceprefix, bool showimplicit)
Definition: ruleutils.c:3645
char * generate_opclass_name(Oid opclass)
Definition: ruleutils.c:12889
char * get_range_partbound_string(List *bound_datums)
Definition: ruleutils.c:13666
Definition: pg_list.h:54
Definition: nodes.h:135
List * rtable
Definition: plannodes.h:91