Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

up vote 1 down vote accepted

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.

share|improve this answer
How do I know what SRID to use? – Ivar Mar 30 '13 at 14:35
@Ivar, look in geometry_columns table. – SS_Rebelious Mar 30 '13 at 14:41
Ah, there it is! Works. Thanks alot. :-) – Ivar Mar 30 '13 at 14:48

Try using


instead. Replace 4326 with the correct code as necessary.

share|improve this answer

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