projects
/
postgis
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a48fbb1
)
Added mem_size(lwgeom)
author
Sandro Santilli
<strk@keybit.net>
Thu, 19 Aug 2004 13:56:30 +0000
(13:56 +0000)
committer
Sandro Santilli
<strk@keybit.net>
Thu, 19 Aug 2004 13:56:30 +0000
(13:56 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@699
b70326c6
-7e19-0410-871a-
916f4a2858ee
lwgeom/lwgeom_functions_basic.c
patch
|
blob
|
history
diff --git
a/lwgeom/lwgeom_functions_basic.c
b/lwgeom/lwgeom_functions_basic.c
index 10b2dc7a686ff94d1c807c1db00cc875bd846ff4..82e9293c278f0075addb68cb447e0ae489137ac5 100644
(file)
--- 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)));
+}