Skip to content

Commit be4352d

Browse files
committed
Add support postgres 9.6
1 parent 327db8f commit be4352d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sr_plan.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ PlannedStmt *sr_planner(Query *parse,
8383
sr_plans_table_rv = makeRangeVar("public", "sr_plans", -1);
8484
sr_plans_heap = heap_openrv(sr_plans_table_rv, heap_lock);
8585

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
8689
query_index_rel_oid = DatumGetObjectId(DirectFunctionCall1(to_regclass, CStringGetDatum("sr_plans_query_hash_idx")));
90+
#endif
8791
if (query_index_rel_oid == InvalidOid)
8892
{
8993
elog(WARNING, "Not found sr_plans_query_hash_idx index");
@@ -485,4 +489,4 @@ sr_plan_invalid_table(PG_FUNCTION_ARGS)
485489
heap_close(sr_plans_heap, RowExclusiveLock);
486490

487491
PG_RETURN_NULL();
488-
}
492+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy