1700{
1702
1704
1707 bool em_is_const;
1708 bool em_is_child;
1711
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764typedef struct
1765{
1767 int current_relid;
1768
1769
1771
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1792{
1794
1796
1797
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1814{
1816
1820
1821
1822
1823
1824
1825
1827{
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1857{
1859
1861
1862
1864
1865
1867
1868
1870
1871
1873
1874
1877
1878
1879#define get_pathtarget_sortgroupref(target, colno) \
1880 ((target)->sortgrouprefs ? (target)->sortgrouprefs[colno] : (Index) 0)
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1904{
1906
1908
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1950{
1952
1954
1955
1957
1958
1959
1960
1961
1962
1963
1965
1966
1967
1968
1969
1970
1972
1973
1974
1975
1976
1977
1978
1979
1981
1982
1984
1986
1988
1989
1994
1995
1998
1999
2000#define PATH_REQ_OUTER(path) \
2001 ((path)->param_info ? (path)->param_info->ppi_req_outer : (Relids) NULL)
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2039{
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2085{
2087
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2114{
2118
2119
2120
2121
2122
2123
2124
2126{
2131
2132
2133
2134
2135
2136
2137
2139{
2144
2145
2146
2147
2148
2149
2150
2151
2153{
2157
2158
2159
2160
2161
2162
2163
2165{
2169
2170
2171
2172
2173
2174
2175
2176
2177
2179{
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2199{
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2233
2235{
2238
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2267{
2270
2275
2276#define IS_DUMMY_APPEND(p) \
2277 (IsA((p), AppendPath) && ((AppendPath *) (p))->subpaths == NIL)
2278
2279
2280
2281
2282
2283
2284#define IS_DUMMY_REL(r) is_dummy_rel(r)
2286
2287
2288
2289
2290
2291
2292
2294{
2300
2301
2302
2303
2304
2305
2306
2307
2309{
2313
2314
2315
2316
2317
2318
2319
2321{
2325
2326
2327
2328
2329
2330
2332{
2338
2340
2342
2343
2348
2349
2350
2351
2352
2353
2355{
2361
2362
2363
2364
2365
2367{
2372
2373
2374
2375
2376
2377
2379{
2381
2383
2385
2387
2388
2391
2393
2394
2395
2396
2397
2398
2400
2401
2402
2403
2404
2406{
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2452{
2454 List *path_mergeclauses;
2455 List *outersortkeys;
2456 List *innersortkeys;
2457 int outer_presorted_keys;
2458
2459 bool skip_mark_restore;
2460 bool materialize_inner;
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2473{
2475 List *path_hashclauses;
2476 int num_batches;
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2495{
2498 bool dummypp;
2500
2501
2502
2503
2504
2505
2507{
2511
2512
2513
2514
2515
2516
2517
2518
2519
2521{
2525
2526
2527
2528
2529
2530
2531
2533{
2535 int nPresortedCols;
2537
2538
2539
2540
2541
2542
2543
2544
2545
2547{
2553
2554
2555
2556
2557
2558
2559
2561{
2564 int numkeys;
2566
2567
2568
2569
2570
2571
2572
2573
2575{
2585
2586
2587
2588
2589
2591{
2593
2598
2600{
2602
2608 bool hashable;
2609 bool is_hashed;
2611
2612
2613
2614
2615
2617{
2625
2626
2627
2628
2630{
2635
2636
2637
2638
2640{
2646 bool topwindow;
2647
2649
2650
2651
2652
2654{
2663
2664
2665
2666
2668{
2673 int wtParam;
2676
2677
2678
2679
2681{
2685 int epqParam;
2687
2688
2689
2690
2691
2692
2693
2694
2696{
2700 bool canSetTag;
2701 Index nominalRelation;
2703 List *resultRelations;
2704 List *updateColnosLists;
2705 List *withCheckOptionLists;
2706 List *returningLists;
2709 int epqParam;
2710 List *mergeActionLists;
2711
2712 List *mergeJoinConditions;
2713
2715
2716
2717
2718
2720{
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2879{
2881
2883
2884
2886
2887
2888 bool is_pushed_down;
2889
2890
2892
2893
2895
2896
2897 bool has_clone;
2898 bool is_clone;
2899
2900
2902
2903
2905
2906
2907 Index security_level;
2908
2909
2911
2912
2914
2915
2917
2918
2919 Relids incompatible_relids;
2920
2921
2923
2924
2925
2926
2927
2930
2931
2932
2933
2934
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957 int rinfo_serial;
2958
2959
2960
2961
2962
2964
2965
2966
2967
2968
2969
2971
2972
2974
2976
2977
2978
2979
2980
2982
2983
2984
2985
2986
2987
2989
2991
2993
2995
2996
2997
2998
2999
3000
3002
3003
3004
3005
3006
3008
3009
3010
3011
3012
3014
3015
3016
3017
3018
3020
3022
3024
3026
3027
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042#define RINFO_IS_PUSHED_DOWN(rinfo, joinrelids) \
3043 ((rinfo)->is_pushed_down || \
3044 !bms_is_subset((rinfo)->required_relids, joinrelids))
3045
3046
3047
3048
3049
3050
3051
3052
3054{
3055
3059 bool nulls_first;
3060
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3100{
3102
3104
3105
3107
3108
3110
3111
3113
3114
3116
3117
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3206{
3208
3220 bool lhs_strict;
3221
3222 bool semi_can_btree;
3223 bool semi_can_hash;
3224 List *semi_operators;
3225 List *semi_rhs_exprs;
3227
3228
3229
3230
3231
3232
3233
3235{
3237
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3274{
3276
3278
3279
3280
3281
3282
3283
3284
3287
3288
3289
3290
3291
3292
3293
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313 List *translated_vars;
3314
3315
3316
3317
3318
3319
3320
3321 int num_child_cols;
3323
3324
3325
3326
3327
3328
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3351{
3353
3355
3358 char *rowidname;
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3389{
3391
3393
3394
3396
3397
3398
3399
3400
3402
3403
3405
3406
3408
3409
3411
3412
3415
3416
3417
3418
3419
3420
3422{
3424
3426
3427
3429
3430
3432
3433
3435
3436
3437
3438
3439
3441
3442
3444
3445
3447
3448
3451
3452
3453
3454
3455
3456
3457
3458
3460{
3462
3464
3465
3467
3468
3471
3472
3473
3474
3475
3476
3477
3478
3480{
3482
3484
3485
3487
3488
3490
3491
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3543{
3545
3547
3549 int paramId;
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3569{
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3589{
3591 List *mergeclause_list;
3592 bool inner_unique;
3595 Relids param_source_rels;
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614#define GROUPING_CAN_USE_SORT 0x0001
3615#define GROUPING_CAN_USE_HASH 0x0002
3616#define GROUPING_CAN_PARTIAL_AGG 0x0004
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629typedef enum
3630{
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649typedef struct
3650{
3651
3652 int flags;
3653 bool partial_costs_set;
3656
3657
3658 bool target_parallel_safe;
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674typedef struct
3675{
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3695{
3696
3697 int disabled_nodes;
3700
3701
3703
3704
3705 Cost inner_run_cost;
3706 Cost inner_rescan_run_cost;
3707
3708
3713
3714
3715 int numbuckets;
3716 int numbatches;
3719
3720
3721
3722
3723
3724
3726{
3728
3730
3731
3732
3733
3734
3735
3736
3738
3739
3740 int transno;
3741
3742
3743
3744
3745
3746 bool shareable;
3747
3748
3751
3752
3753
3754
3755
3756
3757
3758
3760{
3762
3764
3765
3768
3769
3771
3772
3774
3775
3777
3778
3780
3781
3783
3784
3785 int32 aggtranstypmod;
3786 int transtypeLen;
3787 bool transtypeByVal;
3788
3789
3790 int32 aggtransspace;
3791
3792
3794 bool initValueIsNull;
3796
3797
3798
3799
3800
3802{
3804
3806
3807
3808
3809
3810
3812
3813
3814
3815
3816
3817 bool self_join;
3818
3819
3820
3821
3822
3823
3824
3825 List *extra_clauses;
3827
3828#endif
Datum subpath(PG_FUNCTION_ARGS)
#define pg_node_attr(...)
bool is_dummy_rel(RelOptInfo *rel)
PartitionwiseAggregateType
@ PARTITIONWISE_AGGREGATE_PARTIAL
@ PARTITIONWISE_AGGREGATE_FULL
@ PARTITIONWISE_AGGREGATE_NONE
bool limit_needed(Query *parse)
List * child_append_relid_sets
Selectivity bitmapselectivity
Selectivity bitmapselectivity
const struct CustomPathMethods * methods
List * custom_restrictinfo
struct RestrictInfo * rinfo
ScanDirection indexscandir
Selectivity indexselectivity
Cardinality est_unique_keys
List * child_append_relid_sets
VolatileFunctionStatus has_volatile_expr