[postgis-users] Writing to PostGIS with OGR

Frank Warmerdam warmerdam at pobox.com
Thu Feb 16 05:38:13 PST 2006


Philippe Wüger wrote:
> Ok, I didn't know I couldn't set features which were ExecuteSQL() result 
> sets. I changed the program to use GetLayerByName(). SetFeature() now 
> prints Messages like this: "OGR_PG: PQexec(DELETE FROM "str" WHERE 
> "ogc_fid" = 64696)". Is this what I am supposed to see if features get set?

Philippe,

Yes, that should show up in debug mode.  OGR's PG driver does SetFeature()
by deleting the existing row, and then re-creating it rather than trying
to use UPDATE.

> Unfortunately, I now get an "EXC_BAD_ACCESS" signal during  execution of 
> the program. If I run it with ExecuteSQL() I don't get that error.

Well, the bad access is definitely not supposed to happen.  If you are in
a position to debug things, that would be very helpful.  If not, perhaps
we can figure out how I can reproduce the problem here.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the postgis-users mailing list