blob: 67036ac3c112f2bebbad20e860c6cb91ef09a6b9 [file] [log] [blame]
/*-------------------------------------------------------------------------
*
* version.c
* Returns the PostgreSQL version string
*
* Copyright (c) 1998-2023, 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_attribute_unused() )
{
char version[512];
strcpy(version, PG_VERSION_STR " compiled on " __DATE__ " " __TIME__);
#ifdef USE_ASSERT_CHECKING
strcat(version, " (with assert checking)");
#endif
PG_RETURN_TEXT_P(cstring_to_text(version));
}