This question already has an answer here:

I did accidently delete a table row - or well, in fact a whole subway station.

My attempt to solve the problem was this PostGIS function:


But then PostgreSQL started to complain about some SRID connection with the spatial_ref_sys table. What did I do wrong? Is it possible to add this through QGIS instead?

marked as duplicate by underdark Mar 30 '13 at 13:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Try INSERT INTO and use SRID parameter for the geometry

INSERT INTO your_table
col-1-value,...,col-n-value, (SELECT ST_GeomFromText('POINT(coordinates)', SRID))

where SRID is an id of your spatial reference system (4326 for example).

Also it is possible to add needed points using QGIS. Check corresponding section of QGIS manual.

  • How do I know what SRID to use? – Ivar Mar 30 '13 at 14:35
  • 2
    @Ivar, look in geometry_columns table. – SS_Rebelious Mar 30 '13 at 14:41

Try using


instead. Replace 4326 with the correct code as necessary.

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