1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-17 22:22:26 +03:00

From: Jeroen van Vianen <jeroenv@design.nl>

Attached patch will add a version() function to Postges, e.g.

template1=> select version();
version
------------------------------------------------------------
PostgreSQL 6.3.2 on i586-pc-linux-gnu, compiled by gcc 2.8.1
(1 row)
This commit is contained in:
Marc G. Fournier
1998-04-29 12:41:29 +00:00
parent bab9818c4b
commit 51a1741cfb
11 changed files with 422 additions and 325 deletions

@@ -0,0 +1,28 @@
/*-------------------------------------------------------------------------
*
* version.c--
* Returns the version string
*
* IDENTIFICATION
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.1 1998/04/29 12:38:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#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;
strcpy(VARDATA(ret), PG_VERSION_STR);
return ret;
}