Closed SannaJokela closed 10 months ago
Is this something that is related to this issue: https://www.2ndquadrant.com/en/blog/postgresql-10-identity-columns/
That was it.
Problem appears for tables:
Possible solution (for koodistot.dokumenttityyppi):
-- let's create a new PostGIS table which involves all the data the original table does + new column for unique id CREATE TABLE koodistot.dokumenttityyppi2 ( ugid uuid DEFAULT uuid_generate_v4(), gid INTEGER NOT NULL DEFAULT nextval('koodistot.dokumenttityyppi_gid_seq'::regclass), nimi VARCHAR, kuvaus VARCHAR, PRIMARY KEY (ugid) );
INSERT INTO koodistot.dokumenttityyppi2 ( gid, nimi, kuvaus ) SELECT * FROM koodistot.dokumenttityyppi;
No longer updated
Error for most of the codelists when adding new rows - due to problems with the foreign key. QGIS does not understand the existing values for gid and tries to add the same gid that already existst. Workaround: forms > default value (aggregate('layerxxx','max',"gid")+1). Needs corrections for QGIS projects (both asemakaava and yleiskaava)