Hi all,
the Versioning menu replaces the original primary key with a new one,
leaving the original id as a non PK field:

ALTER TABLE "public"."province_hist" ADD "id_hist" serial, ADD
"time_start" timestamp, ADD "time_end" timestamp;

ALTER TABLE "public"."province_hist" DROP CONSTRAINT
"province_hist_pkey", ADD PRIMARY KEY ("id_hist");

Then it adds only the original id, no PK, and not the new PK to the view:

CREATE VIEW "public"."province_hist_current" AS SELECT
"geom","provincia","id" FROM "public"."province_hist" WHERE "time_end"
IS NULL;

As a result, the view does not have an unique field, and cannot be loaded.
The fix is simple, just adding id_hist to view definition. Am I missing
something, or should I go ahead and fix it?

All the best, and thanks.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to