[postgis-devel] Issue 116 in postgis: Hex string representing POLYGON EMPTY crashes postmaster
codesite-noreply at google.com
codesite-noreply at google.com
Mon Feb 16 07:32:13 PST 2009
Status: New
Owner: ----
New issue 116 by martijnm: Hex string representing POLYGON EMPTY crashes
postmaster
http://code.google.com/p/postgis/issues/detail?id=116
What steps will reproduce the problem?
--------------------------------------------------------------------
This will demonstrate the crashing of the postmaster:
gisbase=> select astext('010300000000000000');
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
What is the expected output? What do you see instead?
--------------------------------------------------------------------
Expected would be a result of 'POLYGON EMPTY'.
What version of the product are you using? On what operating system?
--------------------------------------------------------------------
gisbase=> select postgis_full_version();
postgis_full_version
---------------------------------------------------------------------------------------------------------------------
POSTGIS="1.3.5" GEOS="3.0.3-CAPI-1.4.2" PROJ="Rel. 4.6.1, 21 August 2008"
on a Sun AMD:
SunOS 5.10 Generic_138889-02 i86pc i386 i86pc
Please provide any additional information below.
--------------------------------------------------------------------
Apparently postgis maps empty geometry internally to an empty collection:
gisbase=> select geomfromewkt('POLYGON EMPTY');
geomfromewkt
--------------------
010700000000000000
(1 row)
gisbase=> select astext(geomfromewkt('POLYGON EMPTY'));
astext
--------------------------
GEOMETRYCOLLECTION EMPTY
(1 row)
However, if third party software tries to write a hexadecimal
representation of an empty polygon ('010300000000000000'). PostGIS will
crash the postmaster. This is the case when using FME to load a shapefile
to PostGIS for example.
Both a. insert statements and b. copy statements using hexadecimal
representation will crash the postmaster. WKT notation goes correct and can
thus be used as temporary workaround.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the postgis-devel
mailing list