mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-03 17:47:29 +08:00
The old name of this file was never a very good indication of what it was for. Now that there's also access/relation.h, we have a potential confusion hazard as well, so let's rename it to something more apropos. Per discussion, "pathnodes.h" is reasonable, since a good fraction of the file is Path node definitions. While at it, tweak a couple of other headers that were gratuitously importing relation.h into modules that don't need it. Discussion: https://postgr.es/m/7719.1548688728@sss.pgh.pa.us
60 lines
1.9 KiB
C
60 lines
1.9 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* clauses.h
|
|
* prototypes for clauses.c.
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* src/include/optimizer/clauses.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef CLAUSES_H
|
|
#define CLAUSES_H
|
|
|
|
#include "access/htup.h"
|
|
#include "nodes/pathnodes.h"
|
|
|
|
typedef struct
|
|
{
|
|
int numWindowFuncs; /* total number of WindowFuncs found */
|
|
Index maxWinRef; /* windowFuncs[] is indexed 0 .. maxWinRef */
|
|
List **windowFuncs; /* lists of WindowFuncs for each winref */
|
|
} WindowFuncLists;
|
|
|
|
extern bool contain_agg_clause(Node *clause);
|
|
extern void get_agg_clause_costs(PlannerInfo *root, Node *clause,
|
|
AggSplit aggsplit, AggClauseCosts *costs);
|
|
|
|
extern bool contain_window_function(Node *clause);
|
|
extern WindowFuncLists *find_window_functions(Node *clause, Index maxWinRef);
|
|
|
|
extern double expression_returns_set_rows(Node *clause);
|
|
|
|
extern bool contain_subplans(Node *clause);
|
|
|
|
extern char max_parallel_hazard(Query *parse);
|
|
extern bool is_parallel_safe(PlannerInfo *root, Node *node);
|
|
extern bool contain_nonstrict_functions(Node *clause);
|
|
extern bool contain_leaked_vars(Node *clause);
|
|
|
|
extern Relids find_nonnullable_rels(Node *clause);
|
|
extern List *find_nonnullable_vars(Node *clause);
|
|
extern List *find_forced_null_vars(Node *clause);
|
|
extern Var *find_forced_null_var(Node *clause);
|
|
|
|
extern bool is_pseudo_constant_clause(Node *clause);
|
|
extern bool is_pseudo_constant_clause_relids(Node *clause, Relids relids);
|
|
|
|
extern int NumRelids(Node *clause);
|
|
|
|
extern void CommuteOpExpr(OpExpr *clause);
|
|
extern void CommuteRowCompareExpr(RowCompareExpr *clause);
|
|
|
|
extern Query *inline_set_returning_function(PlannerInfo *root,
|
|
RangeTblEntry *rte);
|
|
|
|
#endif /* CLAUSES_H */
|