Hm, I must be misunderstanding something totally :slight_smile: If I do:

shp2pgsql -p -g way 20090407_trk_edg cfd | psql gis
shp2pgsql -a -g way 20090407_trk_edg cfd | psql gis

It still gives me the same error:

2009-04-09 14:04:05 CEST ERROR:  column "the_geom" does not exist at character 17
2009-04-09 14:04:05 CEST STATEMENT:  SELECT AsBinary("the_geom") AS geom from 
          (select way from cfd) as cfd WHERE "the_geom" && SetSRID('BOX3D(4.883334414476785 51.303,5.959665585523214 51.97099999999999)'::box3d,-1)

So it still seems to want the “the_geom” column somehow?