1

I have a table in PostgreSQL. The table includes geometries in 2 columns. The two geometries are the startpoint and endpoint. If I want to move one of the points in QGIS, is not allowed. If I save the point layer as a shp file, I can move the point.

How it is possible to move the points (edit the position) in QGIS and save the new position in the database?

2
  • 2
    What do you mean by not allowed, do you get error?
    – Bera
    Commented Nov 8, 2022 at 18:40
  • Icon for moving is disabled. But i can create a new point. The database must have the rights for editing. If i Export the layer to a shp file the moving icon is enabled.
    – Tibor
    Commented Nov 8, 2022 at 19:31

1 Answer 1

2

QGIS need a primary key !

alter table t_geom_test add id serial not null;
alter table t_geom_test add primary key (id);

After that works to edit the Points.

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.