PostgreSQL Source Code  git master
rewriteHandler.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * rewriteHandler.h
4  * External interface to query rewriter.
5  *
6  *
7  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/rewrite/rewriteHandler.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef REWRITEHANDLER_H
15 #define REWRITEHANDLER_H
16 
17 #include "nodes/parsenodes.h"
18 #include "utils/relcache.h"
19 
20 extern List *QueryRewrite(Query *parsetree);
21 extern void AcquireRewriteLocks(Query *parsetree,
22  bool forExecute,
23  bool forUpdatePushedDown);
24 
25 extern Node *build_column_default(Relation rel, int attrno);
26 
27 extern Query *get_view_query(Relation view);
28 extern bool view_has_instead_trigger(Relation view, CmdType event,
29  List *mergeActionList);
30 extern const char *view_query_is_auto_updatable(Query *viewquery,
31  bool check_cols);
32 extern int relation_is_updatable(Oid reloid,
33  List *outer_reloids,
34  bool include_triggers,
35  Bitmapset *include_cols);
36 extern void error_view_not_updatable(Relation view,
37  CmdType command,
38  List *mergeActionList,
39  const char *detail);
40 
41 #endif /* REWRITEHANDLER_H */
CmdType
Definition: nodes.h:263
unsigned int Oid
Definition: postgres_ext.h:31
void AcquireRewriteLocks(Query *parsetree, bool forExecute, bool forUpdatePushedDown)
bool view_has_instead_trigger(Relation view, CmdType event, List *mergeActionList)
const char * view_query_is_auto_updatable(Query *viewquery, bool check_cols)
int relation_is_updatable(Oid reloid, List *outer_reloids, bool include_triggers, Bitmapset *include_cols)
List * QueryRewrite(Query *parsetree)
Query * get_view_query(Relation view)
void error_view_not_updatable(Relation view, CmdType command, List *mergeActionList, const char *detail)
Node * build_column_default(Relation rel, int attrno)
Definition: pg_list.h:54
Definition: nodes.h:129