![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
SQL function provsql.tool_available() – report whether an external tool is on the backend's resolved PATH.
More...
#include "postgres.h"#include "fmgr.h"#include "external_tool.h"#include "provsql_utils_cpp.h"#include <string>
Go to the source code of this file.
Functions | |
| Datum | tool_available (PG_FUNCTION_ARGS) |
| PostgreSQL-callable entry point. | |
SQL function provsql.tool_available() – report whether an external tool is on the backend's resolved PATH.
The check uses the same find_external_tool() helper that the compilers / WMC counters / GraphViz wrappers themselves consult, so the result reflects exactly what a subsequent probability_evaluate('compilation', '<tool>') call would see, including the provsql.tool_search_path GUC prepended to $PATH.
Used by Studio (and any other client) to filter the list of usable knowledge compilers / model counters before offering them in the UI or running the probability benchmark.
Definition in file tool_available.cpp.
| Datum tool_available | ( | PG_FUNCTION_ARGS | ) |
PostgreSQL-callable entry point.
Argument: name (text), a bare executable name (e.g. "d4") or an absolute path. Names with a slash bypass the PATH walk and are tested directly with access(X_OK).
Returns: true iff find_external_tool returns a non-empty resolved path. NULL input returns NULL (STRICT in the SQL declaration). A trailing whitespace-only input returns false.
Definition at line 42 of file tool_available.cpp.
