1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00
Files
postgres/src/backend/utils/adt/version.c
1998-10-12 05:09:55 +00:00

32 lines
628 B
C

/*-------------------------------------------------------------------------
*
* version.c--
* Returns the version string
*
* IDENTIFICATION
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.4 1998/10/12 05:09:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <string.h>
#include "postgres.h"
#include "version.h"
text *version(void);
text *
version(void)
{
int n = strlen(PG_VERSION_STR) + VARHDRSZ;
text *ret = (text *) palloc(n);
VARSIZE(ret) = n;
StrNCpy(VARDATA(ret), PG_VERSION_STR, strlen(PG_VERSION_STR));
return ret;
}