Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b60c397

Browse files
committed
Move inheritance expansion code into its own file
This commit moves expand_inherited_tables and underlings from optimizer/prep/prepunionc.c to optimizer/utils/inherit.c. Also, all of the AppendRelInfo-based expression manipulation routines are moved to optimizer/utils/appendinfo.c. No functional code changes. One exception is the introduction of make_append_rel_info, but that's still just moving around code. Also, stop including <limits.h> in prepunion.c, which no longer needs it since 3fc6e2d. I (Álvaro) noticed this because Amit was copying that to inherit.c, which likewise doesn't need it. Author: Amit Langote Discussion: https://postgr.es/m/3be67028-a00a-502c-199a-da00eec8fb6e@lab.ntt.co.jp
1 parent dacadcd commit b60c397

File tree

15 files changed

+1343
-1227
lines changed

15 files changed

+1343
-1227
lines changed

src/backend/optimizer/path/allpaths.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030
#ifdef OPTIMIZER_DEBUG
3131
#include "nodes/print.h"
3232
#endif
33+
#include "optimizer/appendinfo.h"
3334
#include "optimizer/clauses.h"
3435
#include "optimizer/cost.h"
3536
#include "optimizer/geqo.h"
37+
#include "optimizer/inherit.h"
3638
#include "optimizer/pathnode.h"
3739
#include "optimizer/paths.h"
3840
#include "optimizer/plancat.h"
3941
#include "optimizer/planner.h"
40-
#include "optimizer/prep.h"
4142
#include "optimizer/restrictinfo.h"
4243
#include "optimizer/tlist.h"
4344
#include "optimizer/var.h"

src/backend/optimizer/path/equivclass.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#include "catalog/pg_type.h"
2323
#include "nodes/makefuncs.h"
2424
#include "nodes/nodeFuncs.h"
25+
#include "optimizer/appendinfo.h"
2526
#include "optimizer/clauses.h"
2627
#include "optimizer/pathnode.h"
2728
#include "optimizer/paths.h"
2829
#include "optimizer/planmain.h"
29-
#include "optimizer/prep.h"
3030
#include "optimizer/restrictinfo.h"
3131
#include "optimizer/var.h"
3232
#include "utils/lsyscache.h"

src/backend/optimizer/path/joinrels.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
#include "postgres.h"
1616

1717
#include "miscadmin.h"
18+
#include "optimizer/appendinfo.h"
1819
#include "optimizer/clauses.h"
1920
#include "optimizer/joininfo.h"
2021
#include "optimizer/pathnode.h"
2122
#include "optimizer/paths.h"
22-
#include "optimizer/prep.h"
2323
#include "partitioning/partbounds.h"
2424
#include "utils/lsyscache.h"
2525
#include "utils/memutils.h"

src/backend/optimizer/plan/planmain.c

+2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
*/
2121
#include "postgres.h"
2222

23+
#include "optimizer/appendinfo.h"
2324
#include "optimizer/clauses.h"
25+
#include "optimizer/inherit.h"
2426
#include "optimizer/orclauses.h"
2527
#include "optimizer/pathnode.h"
2628
#include "optimizer/paths.h"

src/backend/optimizer/plan/planner.c

+2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@
3737
#ifdef OPTIMIZER_DEBUG
3838
#include "nodes/print.h"
3939
#endif
40+
#include "optimizer/appendinfo.h"
4041
#include "optimizer/clauses.h"
4142
#include "optimizer/cost.h"
43+
#include "optimizer/inherit.h"
4244
#include "optimizer/pathnode.h"
4345
#include "optimizer/paths.h"
4446
#include "optimizer/plancat.h"

0 commit comments

Comments
 (0)