1/*-------------------------------------------------------------------------
2 *
3 * ruleutils.h
4 * Declarations for ruleutils.c
5 *
6 * Portions Copyright (c) 1996-2019, 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
21extern char *pg_get_indexdef_string(Oid indexrelid);
22extern char *pg_get_indexdef_columns(Oid indexrelid, bool pretty);
23
24extern char *pg_get_partkeydef_columns(Oid relid, bool pretty);
25extern char *pg_get_partconstrdef_string(Oid partitionId, char *aliasname);
26
27extern char *pg_get_constraintdef_command(Oid constraintId);
28extern char *deparse_expression(Node *expr, List *dpcontext,
29 bool forceprefix, bool showimplicit);
30extern List *deparse_context_for(const char *aliasname, Oid relid);
31extern List *deparse_context_for_plan_rtable(List *rtable, List *rtable_names);
32extern List *set_deparse_context_planstate(List *dpcontext,
33 Node *planstate, List *ancestors);
34extern List *select_rtable_names_for_explain(List *rtable,
35 Bitmapset *rels_used);
36extern char *generate_collation_name(Oid collid);
37extern char *get_range_partbound_string(List *bound_datums);
38
39#endif /* RULEUTILS_H */
40