<div dir="ltr">Hi,<div><br></div><div>   I'm trying to write a C-Library function to return a PostGIS point. It's crashing the backend when called:<br><div><br></div><div>=> select test2();</div><div>The connection to the server was lost. Attempting reset: Failed.</div>

<div><br></div><div>   Minimal Makefile, .c, and .sql files are attached. Any suggestions on what I might be doing wrong? I tried to mimic existing functions found in PostGIS, examples at <a href="http://trac.osgeo.org/postgis/wiki/DevWikiPostGISCoding">http://trac.osgeo.org/postgis/wiki/DevWikiPostGISCoding</a>, and other code I found like the KM_ToLLA function at <a href="https://github.com/kmatzen/PG_LLA_ECEF/blob/master/pg_lla_ecef.c">https://github.com/kmatzen/PG_LLA_ECEF/blob/master/pg_lla_ecef.c</a>.</div>
<div><br></div><div>=> select version();<br></div><div>PostgreSQL 9.2.1 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.4.5-8) 4.4.5, 64-bit<br>
</div><div><br></div><div>=> select postgis_full_version();<br></div><div>POSTGIS="2.0.1SVN r9750" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" LIBJSON="UNKNOWN"<br>

</div><div><br></div><div>(PostGIS raster and topology are not installed.)</div></div><div><br></div><div style>Thanks,</div><div style><br></div><div style>Dave</div></div>