I am using QField with QGIS to collect data in the field, in offline mode. My data are stored in a PostGIS database I manage. I used QFieldSync to package my QGIS project and was able to open it on my Android device and edit/add features just fine. The layer to be edited on the field has a 'gid' primary key, of type serial, not null, in the database.

What happens is that on field, when I split a feature in this layer, the new part doesn't get a new 'gid', and the field value remains null. Of course when I synch data back to the project on the fixed PC the new features are not inserted in the database, and are lost. What I need to do to be able to collect data offline on the field and bring them back in my PostGIS database? (offline is required, can't have a network connection).

1 Answer 1


Well, I'm answering my question: in this case I've found that I had a problem with the gid sequence update permissions for the user on the layer I was trying to sync from QField, and after correct configuration I was able to import data from offline collected data into PostGIS layer.

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.