65
65
*/
66
66
#if PG_VERSION_NUM >= 110000
67
67
#define calc_nestloop_required_outer_compat (outer , inner ) \
68
- calc_nestloop_required_outer((outer)->parent->relids, PATH_REQ_OUTER(outer), \
68
+ calc_nestloop_required_outer((outer)->parent->relids, PATH_REQ_OUTER(outer), \
69
69
(inner)->parent->relids, PATH_REQ_OUTER(inner))
70
70
#else
71
71
#define calc_nestloop_required_outer_compat (outer , inner ) \
72
- calc_nestloop_required_outer((outer), (inner))
72
+ calc_nestloop_required_outer((outer), (inner))
73
73
#endif
74
74
75
75
120
120
* CheckValidResultRel()
121
121
*/
122
122
#if PG_VERSION_NUM >= 170000
123
- #define CheckValidResultRelCompat (rri , cmd ) \
124
- CheckValidResultRel((rri), (cmd), NIL)
123
+ #define CheckValidResultRelCompat (rri , cmd ) \
124
+ CheckValidResultRel((rri), (cmd), NIL)
125
125
#elif PG_VERSION_NUM >= 100000
126
- #define CheckValidResultRelCompat (rri , cmd ) \
127
- CheckValidResultRel((rri), (cmd))
126
+ #define CheckValidResultRelCompat (rri , cmd ) \
127
+ CheckValidResultRel((rri), (cmd))
128
128
#elif PG_VERSION_NUM >= 90500
129
- #define CheckValidResultRelCompat (rri , cmd ) \
130
- CheckValidResultRel((rri)->ri_RelationDesc, (cmd))
129
+ #define CheckValidResultRelCompat (rri , cmd ) \
130
+ CheckValidResultRel((rri)->ri_RelationDesc, (cmd))
131
131
#endif
132
132
133
133
/*
265
265
#define create_append_path_compat (rel , subpaths , required_outer , parallel_workers ) \
266
266
create_append_path(NULL, (rel), (subpaths), NIL, NIL, (required_outer), \
267
267
(parallel_workers), false, NIL, -1, false)
268
- #endif /* PGPRO_VERSION */
268
+ #endif /* PGPRO_VERSION */
269
269
270
270
#elif PG_VERSION_NUM >= 110000
271
271
277
277
#define create_append_path_compat (rel , subpaths , required_outer , parallel_workers ) \
278
278
create_append_path(NULL, (rel), (subpaths), NIL, (required_outer), \
279
279
(parallel_workers), false, NIL, -1, false, NIL)
280
- #endif /* PGPRO_VERSION */
280
+ #endif /* PGPRO_VERSION */
281
281
282
282
#elif PG_VERSION_NUM >= 100000
283
283
288
288
#define create_append_path_compat (rel , subpaths , required_outer , parallel_workers ) \
289
289
create_append_path((rel), (subpaths), (required_outer), (parallel_workers), NIL, \
290
290
false, NIL)
291
- #endif /* PGPRO_VERSION */
291
+ #endif /* PGPRO_VERSION */
292
292
293
293
#elif PG_VERSION_NUM >= 90600
294
294
299
299
#define create_append_path_compat (rel , subpaths , required_outer , parallel_workers ) \
300
300
create_append_path((rel), (subpaths), (required_outer), \
301
301
false, NIL, (parallel_workers))
302
- #endif /* PGPRO_VERSION */
302
+ #endif /* PGPRO_VERSION */
303
303
304
304
#elif PG_VERSION_NUM >= 90500
305
305
#define create_append_path_compat (rel , subpaths , required_outer , parallel_workers ) \
306
306
create_append_path((rel), (subpaths), (required_outer))
307
- #endif /* PG_VERSION_NUM */
307
+ #endif /* PG_VERSION_NUM */
308
308
309
309
310
310
/*
@@ -414,8 +414,8 @@ extern void create_plain_partial_paths(PlannerInfo *root,
414
414
static inline Datum
415
415
ExecEvalExprCompat (ExprState * expr , ExprContext * econtext , bool * isnull )
416
416
{
417
- ExprDoneCond isdone ;
418
- Datum result = ExecEvalExpr (expr , econtext , isnull , & isdone );
417
+ ExprDoneCond isdone ;
418
+ Datum result = ExecEvalExpr (expr , econtext , isnull , & isdone );
419
419
420
420
if (isdone != ExprSingleResult )
421
421
elog (ERROR , "expression should return single value" );
@@ -432,9 +432,9 @@ ExecEvalExprCompat(ExprState *expr, ExprContext *econtext, bool *isnull)
432
432
static inline bool
433
433
ExecCheck (ExprState * state , ExprContext * econtext )
434
434
{
435
- Datum ret ;
436
- bool isnull ;
437
- MemoryContext old_mcxt ;
435
+ Datum ret ;
436
+ bool isnull ;
437
+ MemoryContext old_mcxt ;
438
438
439
439
/* short-circuit (here and in ExecInitCheck) for empty restriction list */
440
440
if (state == NULL )
@@ -530,7 +530,7 @@ extern List *get_all_actual_clauses(List *restrictinfo_list);
530
530
* get_rel_persistence()
531
531
*/
532
532
#if PG_VERSION_NUM >= 90500 && PG_VERSION_NUM < 90600
533
- char get_rel_persistence (Oid relid );
533
+ char get_rel_persistence (Oid relid );
534
534
#endif
535
535
536
536
@@ -583,8 +583,8 @@ char get_rel_persistence(Oid relid);
583
583
* make_restrictinfo()
584
584
*/
585
585
#if PG_VERSION_NUM >= 100000
586
- extern List * make_restrictinfos_from_actual_clauses (PlannerInfo * root ,
587
- List * clause_list );
586
+ extern List * make_restrictinfos_from_actual_clauses (PlannerInfo * root ,
587
+ List * clause_list );
588
588
#endif
589
589
590
590
@@ -607,17 +607,17 @@ extern Result *make_result(List *tlist,
607
607
* McxtStatsInternal()
608
608
*/
609
609
#if PG_VERSION_NUM >= 90600
610
- void McxtStatsInternal (MemoryContext context , int level ,
611
- bool examine_children ,
612
- MemoryContextCounters * totals );
610
+ void McxtStatsInternal (MemoryContext context , int level ,
611
+ bool examine_children ,
612
+ MemoryContextCounters * totals );
613
613
#endif
614
614
615
615
616
616
/*
617
617
* oid_cmp()
618
618
*/
619
619
#if PG_VERSION_NUM >=90500 && PG_VERSION_NUM < 100000
620
- extern int oid_cmp (const void * p1 , const void * p2 );
620
+ extern int oid_cmp (const void * p1 , const void * p2 );
621
621
#endif
622
622
623
623
@@ -626,7 +626,7 @@ extern int oid_cmp(const void *p1, const void *p2);
626
626
*
627
627
* for v10 cast first arg to RawStmt type
628
628
*/
629
- #if PG_VERSION_NUM >= 150000 /* for commit 791b1b71da35 */
629
+ #if PG_VERSION_NUM >= 150000 /* for commit 791b1b71da35 */
630
630
#define parse_analyze_compat (parse_tree , query_string , param_types , nparams , \
631
631
query_env ) \
632
632
parse_analyze_fixedparams((RawStmt *) (parse_tree), (query_string), (param_types), \
@@ -649,7 +649,7 @@ extern int oid_cmp(const void *p1, const void *p2);
649
649
*
650
650
* for v10 cast first arg to RawStmt type
651
651
*/
652
- #if PG_VERSION_NUM >= 150000 /* for commit 791b1b71da35 */
652
+ #if PG_VERSION_NUM >= 150000 /* for commit 791b1b71da35 */
653
653
#define pg_analyze_and_rewrite_compat (parsetree , query_string , param_types , \
654
654
nparams , query_env ) \
655
655
pg_analyze_and_rewrite_fixedparams((RawStmt *) (parsetree), (query_string), \
@@ -722,7 +722,7 @@ extern int oid_cmp(const void *p1, const void *p2);
722
722
* set_dummy_rel_pathlist()
723
723
*/
724
724
#if PG_VERSION_NUM >= 90500 && PG_VERSION_NUM < 90600
725
- void set_dummy_rel_pathlist (RelOptInfo * rel );
725
+ void set_dummy_rel_pathlist (RelOptInfo * rel );
726
726
#endif
727
727
728
728
@@ -744,8 +744,9 @@ extern void set_rel_consider_parallel(PlannerInfo *root,
744
744
* in compat version the type of first argument is (Expr *)
745
745
*/
746
746
#if PG_VERSION_NUM >= 100000
747
- #if PG_VERSION_NUM >= 140000 /* function removed in 375398244168add84a884347625d14581a421e71 */
748
- extern TargetEntry * tlist_member_ignore_relabel (Expr * node , List * targetlist );
747
+ #if PG_VERSION_NUM >= 140000 /* function removed in
748
+ * 375398244168add84a884347625d14581a421e71 */
749
+ extern TargetEntry * tlist_member_ignore_relabel (Expr * node , List * targetlist );
749
750
#endif
750
751
#define tlist_member_ignore_relabel_compat (expr , targetlist ) \
751
752
tlist_member_ignore_relabel((expr), (targetlist))
@@ -775,7 +776,7 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
775
776
tupleid , fdw_trigtuple , newslot ) \
776
777
ExecBRUpdateTriggers((estate), (epqstate), (relinfo), (tupleid), \
777
778
(fdw_trigtuple), (newslot), NULL, NULL)
778
- #elif PG_VERSION_NUM >= 150000 /* for commit 7103ebb7aae8 */
779
+ #elif PG_VERSION_NUM >= 150000 /* for commit 7103ebb7aae8 */
779
780
#define ExecBRUpdateTriggersCompat (estate , epqstate , relinfo , \
780
781
tupleid , fdw_trigtuple , newslot ) \
781
782
ExecBRUpdateTriggers((estate), (epqstate), (relinfo), (tupleid), \
@@ -826,7 +827,7 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
826
827
/*
827
828
* ExecARDeleteTriggers()
828
829
*/
829
- #if PG_VERSION_NUM >= 150000 /* for commit ba9a7e392171 */
830
+ #if PG_VERSION_NUM >= 150000 /* for commit ba9a7e392171 */
830
831
#define ExecARDeleteTriggersCompat (estate , relinfo , tupleid , \
831
832
fdw_trigtuple , transition_capture ) \
832
833
ExecARDeleteTriggers((estate), (relinfo), (tupleid), \
@@ -970,9 +971,9 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
970
971
* we need access to entire tuple, not just its header.
971
972
*/
972
973
#ifdef XID_IS_64BIT
973
- # define HeapTupleGetXminCompat (htup ) HeapTupleGetXmin(htup)
974
+ #define HeapTupleGetXminCompat (htup ) HeapTupleGetXmin(htup)
974
975
#else
975
- # define HeapTupleGetXminCompat (htup ) HeapTupleHeaderGetXmin((htup)->t_data)
976
+ #define HeapTupleGetXminCompat (htup ) HeapTupleHeaderGetXmin((htup)->t_data)
976
977
#endif
977
978
978
979
/*
@@ -1115,9 +1116,10 @@ static inline TupleTableSlot *
1115
1116
ExecInitExtraTupleSlotCompatHorse (EState * s , TupleDesc t )
1116
1117
{
1117
1118
#if PG_VERSION_NUM >= 110000
1118
- return ExecInitExtraTupleSlot (s ,t );
1119
+ return ExecInitExtraTupleSlot (s , t );
1119
1120
#else
1120
- TupleTableSlot * res = ExecInitExtraTupleSlot (s );
1121
+ TupleTableSlot * res = ExecInitExtraTupleSlot (s );
1122
+
1121
1123
if (t )
1122
1124
ExecSetSlotDescriptor (res , t );
1123
1125
@@ -1149,7 +1151,7 @@ CustomEvalParamExternCompat(Param *param,
1149
1151
return prm ;
1150
1152
}
1151
1153
1152
- void set_append_rel_size_compat (PlannerInfo * root , RelOptInfo * rel , Index rti );
1154
+ void set_append_rel_size_compat (PlannerInfo * root , RelOptInfo * rel , Index rti );
1153
1155
1154
1156
/*
1155
1157
* lnext()
@@ -1210,8 +1212,8 @@ void set_append_rel_size_compat(PlannerInfo *root, RelOptInfo *rel, Index rti);
1210
1212
#define make_restrictinfo_compat (r , c , ipd , od , p , sl , rr , or , nr ) make_restrictinfo((r), (c), (ipd), (od), (p), (sl), (rr), (or), (nr))
1211
1213
#else
1212
1214
#define make_restrictinfo_compat (r , c , ipd , od , p , sl , rr , or , nr ) make_restrictinfo((c), (ipd), (od), (p), (sl), (rr), (or), (nr))
1213
- #endif /* #if PG_VERSION_NUM >= 140000 */
1214
- #endif /* #if PG_VERSION_NUM >= 160000 */
1215
+ #endif /* #if PG_VERSION_NUM >= 140000 */
1216
+ #endif /* #if PG_VERSION_NUM >= 160000 */
1215
1217
1216
1218
/*
1217
1219
* pull_varnos()
@@ -1243,4 +1245,4 @@ void set_append_rel_size_compat(PlannerInfo *root, RelOptInfo *rel, Index rti);
1243
1245
#define EvalPlanQualInit_compat (epqstate , parentestate , subplan , auxrowmarks , epqParam ) EvalPlanQualInit(epqstate, parentestate, subplan, auxrowmarks, epqParam)
1244
1246
#endif
1245
1247
1246
- #endif /* PG_COMPAT_H */
1248
+ #endif /* PG_COMPAT_H */
0 commit comments