I need to save my vectors layer back to PostGIS, which if I read correctly I can do using GeoServer, however I'm confused. All the examples ask you to import a shapefile. I don't have a shapefile. This will be a empty vector layer on top of a couple of base layers which the user will add polygons, points etc. etc.

How do I create the tables to hold the vector data. Also how do I know the structure of the tables. e.g columns, column names, primary / foreign key, relationships etc. etc.

1 Answer 1


You can add empty tables to PostGIS in Geoserver:

Before this view can be served by GeoServer, the following step is necessary to manually create the geometry_columns entry:

INSERT INTO geometry_columns VALUES ('','public','my_view','my_geom', 2, 4326, 'POINT' );


  • Hi @Mapperz. I added the values above into the relevant geometry_columns table but when i go to add a new layer from my data store the entry is not available. any ideas Apr 26, 2011 at 14:54
  • did you CREATE TABLE them, too? The example above implies my_view has a point geometry field called my_geom Apr 26, 2011 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.