PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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
20extern List *QueryRewrite(Query *parsetree);
21extern void AcquireRewriteLocks(Query *parsetree,
22 bool forExecute,
23 bool forUpdatePushedDown);
24
25extern Node *build_column_default(Relation rel, int attrno);
26
27extern Query *get_view_query(Relation view);
28extern bool view_has_instead_trigger(Relation view, CmdType event,
29 List *mergeActionList);
30extern const char *view_query_is_auto_updatable(Query *viewquery,
31 bool check_cols);
32extern int relation_is_updatable(Oid reloid,
33 List *outer_reloids,
34 bool include_triggers,
35 Bitmapset *include_cols);
36extern 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)
int relation_is_updatable(Oid reloid, List *outer_reloids, bool include_triggers, Bitmapset *include_cols)
Query * get_view_query(Relation view)
const char * view_query_is_auto_updatable(Query *viewquery, bool check_cols)
List * QueryRewrite(Query *parsetree)
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