From 875d39fbdfe1650c6fdda2309854edded434686b Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 19 Aug 2004 13:56:30 +0000 Subject: [PATCH] Added mem_size(lwgeom) git-svn-id: http://svn.osgeo.org/postgis/trunk@699 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_functions_basic.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lwgeom/lwgeom_functions_basic.c b/lwgeom/lwgeom_functions_basic.c index 10b2dc7a6..82e9293c2 100644 --- a/lwgeom/lwgeom_functions_basic.c +++ b/lwgeom/lwgeom_functions_basic.c @@ -189,3 +189,12 @@ Datum combine_box2d(PG_FUNCTION_ARGS) PG_RETURN_POINTER(result); } + +//find the size of geometry +PG_FUNCTION_INFO_V1(lwgeom_mem_size); +Datum lwgeom_mem_size(PG_FUNCTION_ARGS) +{ + //char *geom = (char *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + //struct varlena *vl = (struct varlena *)(PG_GETARG_POINTER(0)); + PG_RETURN_INT32(VARSIZE(PG_GETARG_POINTER(0))); +} -- 2.40.0