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

I'm adding new features to a polygon datasets in QGIS. The data is held in PostGIS but when i have a look at the attribute table for the polygon the gid field is not automatically updating, the entry reads NULL

I'm editing under the postgres login which looking at the sequeneces in PGadmin says that

ALTER TABLE parking_enforcement.restrictions_gid_seq OWNER TO postgres;

Is there anything special that i need to be doing in Postgres?

share|improve this question
use ALTER SEQUENCE incremental option – Mapperz Sep 14 '12 at 14:07
If there are a few NULL records in the column will this automatically add a unique value? – geosmiles Sep 14 '12 at 18:23
up vote 3 down vote accepted

I'm guessing your gid column is not a serial or doesn't have a default value set to nextval(..).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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