File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ PlannedStmt *sr_planner(Query *parse,
83
83
sr_plans_table_rv = makeRangeVar ("public" , "sr_plans" , -1 );
84
84
sr_plans_heap = heap_openrv (sr_plans_table_rv , heap_lock );
85
85
86
+ #if PG_VERSION_NUM >= 90600
87
+ query_index_rel_oid = DatumGetObjectId (DirectFunctionCall1 (to_regclass , PointerGetDatum (cstring_to_text ("sr_plans_query_hash_idx" ))));
88
+ #else
86
89
query_index_rel_oid = DatumGetObjectId (DirectFunctionCall1 (to_regclass , CStringGetDatum ("sr_plans_query_hash_idx" )));
90
+ #endif
87
91
if (query_index_rel_oid == InvalidOid )
88
92
{
89
93
elog (WARNING , "Not found sr_plans_query_hash_idx index" );
@@ -485,4 +489,4 @@ sr_plan_invalid_table(PG_FUNCTION_ARGS)
485
489
heap_close (sr_plans_heap , RowExclusiveLock );
486
490
487
491
PG_RETURN_NULL ();
488
- }
492
+ }
You can’t perform that action at this time.
0 commit comments