@@ -107,13 +107,7 @@ static void pgsp_shmem_request(void);
107107#endif
108108static void pgsp_shmem_startup (void );
109109/* Saves query plans to the shared hash table. */
110- static
111- #if PG_VERSION_NUM < 180000
112- void
113- #else
114- bool
115- #endif
116- pgsp_ExecutorStart (QueryDesc * queryDesc , int eflags );
110+ static void pgsp_ExecutorStart (QueryDesc * queryDesc , int eflags );
117111/* Keeps track of the nest level. */
118112static void pgsp_ExecutorRun (QueryDesc * queryDesc , ScanDirection direction ,
119113 uint64 count
@@ -469,31 +463,17 @@ pgsp_shmem_startup(void)
469463 LWLockRelease (AddinShmemInitLock );
470464}
471465
472- static
473- #if PG_VERSION_NUM < 180000
474- void
475- #else
476- bool
477- #endif
466+ static void
478467pgsp_ExecutorStart (QueryDesc * queryDesc , int eflags )
479468{
480469 ExplainState * es ;
481- #if PG_VERSION_NUM >= 180000
482- bool ret_val ;
483- #endif
484470
485471 if (prev_ExecutorStart )
486472 {
487- #if PG_VERSION_NUM >= 180000
488- ret_val =
489- #endif
490473 prev_ExecutorStart (queryDesc , eflags );
491474 }
492475 else
493476 {
494- #if PG_VERSION_NUM >= 180000
495- ret_val =
496- #endif
497477 standard_ExecutorStart (queryDesc , eflags );
498478 }
499479
@@ -502,20 +482,12 @@ pgsp_ExecutorStart(QueryDesc *queryDesc, int eflags)
502482 errcode (ERRCODE_OUT_OF_MEMORY ),
503483 errmsg ("not enough memory to append new query plans" ),
504484 errhint ("Try increasing 'pg_show_plans.max_plan_length'." ));
505- return
506- #if PG_VERSION_NUM >= 180000
507- ret_val
508- #endif
509- ;
485+ return ;
510486 }
511487
512488 if (!pgsp -> is_enabled )
513489 {
514- return
515- #if PG_VERSION_NUM >= 180000
516- ret_val
517- #endif
518- ;
490+ return ;
519491 }
520492
521493 es = NewExplainState ();
@@ -527,11 +499,7 @@ pgsp_ExecutorStart(QueryDesc *queryDesc, int eflags)
527499 append_query_plan (es );
528500 pfree (es -> str -> data );
529501
530- return
531- #if PG_VERSION_NUM >= 180000
532- ret_val
533- #endif
534- ;
502+ return ;
535503}
536504
537505static void
0 commit comments