2019-01-10 18:54:31 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* appendinfo.h
|
|
|
|
* Routines for mapping expressions between append rel parent(s) and
|
|
|
|
* children
|
|
|
|
*
|
2021-01-02 19:06:25 +01:00
|
|
|
* Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
|
2019-01-10 18:54:31 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
|
|
|
* src/include/optimizer/appendinfo.h
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef APPENDINFO_H
|
|
|
|
#define APPENDINFO_H
|
|
|
|
|
2019-01-29 22:49:25 +01:00
|
|
|
#include "nodes/pathnodes.h"
|
2019-01-10 18:54:31 +01:00
|
|
|
#include "utils/relcache.h"
|
|
|
|
|
|
|
|
extern AppendRelInfo *make_append_rel_info(Relation parentrel,
|
2019-05-22 19:04:48 +02:00
|
|
|
Relation childrel,
|
|
|
|
Index parentRTindex, Index childRTindex);
|
2019-01-10 18:54:31 +01:00
|
|
|
extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
|
2019-05-22 19:04:48 +02:00
|
|
|
int nappinfos, AppendRelInfo **appinfos);
|
2019-01-10 18:54:31 +01:00
|
|
|
extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node,
|
2019-05-22 19:04:48 +02:00
|
|
|
Relids child_relids,
|
|
|
|
Relids top_parent_relids);
|
2019-01-16 20:27:44 +01:00
|
|
|
extern Relids adjust_child_relids(Relids relids, int nappinfos,
|
2019-05-22 19:04:48 +02:00
|
|
|
AppendRelInfo **appinfos);
|
2019-01-10 18:54:31 +01:00
|
|
|
extern Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids,
|
2019-05-22 19:04:48 +02:00
|
|
|
Relids child_relids, Relids top_parent_relids);
|
2019-01-16 20:27:44 +01:00
|
|
|
extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root,
|
2019-05-22 19:04:48 +02:00
|
|
|
Relids relids, int *nappinfos);
|
2019-01-10 18:54:31 +01:00
|
|
|
|
|
|
|
#endif /* APPENDINFO_H */
|