[postgis-devel] C-Library function returning PostGIS point crashing backend

David Fuhry dfuhry at gmail.com
Thu Jan 10 07:57:08 PST 2013


Hi,

   I'm trying to write a C-Library function to return a PostGIS point. It's
crashing the backend when called:

=> select test2();
The connection to the server was lost. Attempting reset: Failed.

   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
http://trac.osgeo.org/postgis/wiki/DevWikiPostGISCoding, and
other code I found like the KM_ToLLA function at
https://github.com/kmatzen/PG_LLA_ECEF/blob/master/pg_lla_ecef.c.

=> select version();
PostgreSQL 9.2.1 on x86_64-unknown-linux-gnu, compiled by gcc (Debian
4.4.5-8) 4.4.5, 64-bit

=> select postgis_full_version();
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"

(PostGIS raster and topology are not installed.)

Thanks,

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20130110/3fac6660/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 198 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20130110/3fac6660/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.c
Type: text/x-csrc
Size: 587 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20130110/3fac6660/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.sql
Type: application/octet-stream
Size: 113 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20130110/3fac6660/attachment-0001.obj>


More information about the postgis-devel mailing list