[postgis-users] insert to database - error

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Wed Mar 2 01:54:06 PST 2011

On 02/03/11 07:19, Robert Buckley wrote:

> Hi,
> Ubuntu 10.04
> geoserver-2.0.2
> postgresql 8.4
> postgis
> I am experiencing the following:
> I can edit a postgis database geometry in Quantum GIS but I can´t
> "insert" into a postgis table inserted with shp3pgsql. ( I used the
> opengeo-suite windows version to upload the shp)
> my error is here message is here ..
> http://permalink.gmane.org/gmane.comp.gis.geoserver.user/26390
> After days of scratching around the forums and reading this...
> http://lists.osgeo.org/pipermail/openlayers-users/2010-March/016801.html
> ..I decided to do the same a make a simple table in postgis - 1 x "id"
> column (type - integer, primary key, NotNull) and 1 x "the_geom" column
> ( type - geometry)
> I loaded it into geoserver and was able to start editing immediately!!!!
> Is it then something to do with the constraints inserted by
> shp2pgsql?..( I removed all of them one by one and tested the insert,
> but it still didn´t work)
> Possibly do to with the GID column? I ccan´t remove this column without
> breaking the geometry structure.
> Idon´t understand what the problem is with the table imported from a
> shapefile using shp2pgsql

Hi Robert,

The error message coming from Geoserver suggests that a prepared 
statement is failing on the database. Can you try editing your 
postgresql.conf to enable statement logging and restart PostgreSQL? Then 
next time Geoserver throws an error, you can look in the log file to see 
the exact SQL commands that were executed.



Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

More information about the postgis-users mailing list