summaryrefslogtreecommitdiffstats
path: root/src/backend/utils/adt/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/version.c')
-rw-r--r--src/backend/utils/adt/version.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/backend/utils/adt/version.c b/src/backend/utils/adt/version.c
new file mode 100644
index 0000000..7e70498
--- /dev/null
+++ b/src/backend/utils/adt/version.c
@@ -0,0 +1,24 @@
+/*-------------------------------------------------------------------------
+ *
+ * version.c
+ * Returns the PostgreSQL version string
+ *
+ * Copyright (c) 1998-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *
+ * src/backend/utils/adt/version.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres.h"
+
+#include "utils/builtins.h"
+
+
+Datum
+pgsql_version(PG_FUNCTION_ARGS)
+{
+ PG_RETURN_TEXT_P(cstring_to_text(PG_VERSION_STR));
+}