mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-25 09:32:46 +00:00
80bad2c969
git-svn-id: http://svn.osgeo.org/postgis/trunk@723 b70326c6-7e19-0410-871a-916f4a2858ee
39 lines
764 B
C
39 lines
764 B
C
|
|
#include "postgres.h"
|
|
#include "fmgr.h"
|
|
|
|
#if USE_GEOS
|
|
|
|
extern char *GEOSversion();
|
|
extern char *GEOSjtsport();
|
|
|
|
void NOTICE_MESSAGE(char *msg);
|
|
|
|
void NOTICE_MESSAGE(char *msg)
|
|
{
|
|
elog(NOTICE,msg);
|
|
}
|
|
|
|
PG_FUNCTION_INFO_V1(postgis_geos_version);
|
|
Datum postgis_geos_version(PG_FUNCTION_ARGS)
|
|
{
|
|
char *ver = GEOSversion();
|
|
text *result;
|
|
result = (text *) palloc(VARHDRSZ + strlen(ver));
|
|
VARATT_SIZEP(result) = VARHDRSZ + strlen(ver) ;
|
|
memcpy(VARDATA(result), ver, strlen(ver));
|
|
free(ver);
|
|
PG_RETURN_POINTER(result);
|
|
}
|
|
|
|
#else // ! defined USE_GEOS
|
|
|
|
PG_FUNCTION_INFO_V1(postgis_geos_version);
|
|
Datum postgis_geos_version(PG_FUNCTION_ARGS)
|
|
{
|
|
//elog(ERROR,"GEOSversion:: operation not implemented - compile PostGIS with GEOS support");
|
|
PG_RETURN_NULL();
|
|
}
|
|
|
|
#endif
|