ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
build_id.c
Go to the documentation of this file.
1/**
2 * @file build_id.c
3 * @brief The build of the ProvSQL library: @c provsql.build_id().
4 *
5 * The extension's version (@c 1.13.0-dev, say) is the same for every build
6 * of a development cycle. What tells two builds apart is the commit they
7 * were built from, which the Makefile writes into @c build_id.h: the output
8 * of @c "git describe --tags --always --dirty", or @c unknown outside a git
9 * checkout (a source archive).
10 */
11#include "postgres.h"
12#include "fmgr.h"
13#include "utils/builtins.h"
14
15#include "build_id.h"
16
17PG_FUNCTION_INFO_V1(build_id);
18/** @brief SQL entry point: the build of the loaded library, as text. */
19Datum build_id(PG_FUNCTION_ARGS)
20{
21 PG_RETURN_TEXT_P(cstring_to_text(PROVSQL_BUILD_ID));
22}
Datum build_id(PG_FUNCTION_ARGS)
SQL entry point: the build of the loaded library, as text.
Definition build_id.c:19
#define PROVSQL_BUILD_ID
Definition build_id.h:1