diff options
Diffstat (limited to 'src/backend/utils/misc/injection_point.c')
-rw-r--r-- | src/backend/utils/misc/injection_point.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/utils/misc/injection_point.c b/src/backend/utils/misc/injection_point.c index 8ab5bc63276..80bc32b0e08 100644 --- a/src/backend/utils/misc/injection_point.c +++ b/src/backend/utils/misc/injection_point.c @@ -570,3 +570,17 @@ InjectionPointCached(const char *name) elog(ERROR, "Injection points are not supported by this build"); #endif } + +/* + * Test if an injection point is defined. + */ +bool +IsInjectionPointAttached(const char *name) +{ +#ifdef USE_INJECTION_POINTS + return InjectionPointCacheRefresh(name) != NULL; +#else + elog(ERROR, "Injection points are not supported by this build"); + return false; /* silence compiler */ +#endif +} |