https://issues.qgis.org/https://issues.qgis.org/favicon.ico2018-03-09T10:38:46ZQGIS Issue TrackingQGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=886042018-03-09T10:38:46ZAndreas Neumann
<ul><li><strong>Regression?</strong> changed from <i>No</i> to <i>Yes</i></li></ul><p>The issue did not exist in QGIS 2.x - somehow the handling of PostgreSQL layers changed between 2.x and 3.x</p> QGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=886622018-03-12T06:05:15ZNyall Dawson
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>In Progress</i></li><li><strong>Pull Request or Patch supplied</strong> changed from <i>No</i> to <i>Yes</i></li></ul><p><a class="external" href="https://github.com/qgis/QGIS/pull/6587">https://github.com/qgis/QGIS/pull/6587</a></p> QGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=886682018-03-12T11:55:07ZAlessandro Pasotti
<ul><li><strong>Assignee</strong> set to <i>Nyall Dawson</i></li></ul> QGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=887492018-03-15T07:59:31ZAndreas Neumann
<ul></ul><p>I tested the PR. While it works fine in for normal PostgreSQL layers (not in transaction mode), it still fails when transaction mode is turned on.</p>
<p>The problem arises only if the two following project properties are activated:</p>
<ul>
<li>Automatically create transaction groups where possible</li>
<li>Evaluate default values on provider side</li>
</ul>
<p>Thanks for having a look at this specific "transaction mode" situation.</p> QGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=887502018-03-15T08:04:14ZAndreas Neumann
<ul></ul><p>I am adding the create table statement of a concerned table that shows the issue:</p>
<pre>
CREATE TABLE ews.ews_geologie
(
t_id bigint NOT NULL DEFAULT nextval('ews.t_ili2db_seq'::regclass),
t_basket bigint NOT NULL DEFAULT 4,
t_ili_tid uuid DEFAULT uuid_generate_v4(),
zulaessigkeit bigint NOT NULL,
gebietsnummer character varying(10) COLLATE pg_catalog."default",
mutationsdatum date,
geologie_intern text COLLATE pg_catalog."default",
geologie_extern text COLLATE pg_catalog."default",
bemerkungen_intern text COLLATE pg_catalog."default",
bemerkungen_extern text COLLATE pg_catalog."default",
geometrie geometry(Polygon,2056),
CONSTRAINT ews_geologie_pkey PRIMARY KEY (t_id),
CONSTRAINT ews_geologie_t_basket_fkey FOREIGN KEY (t_basket)
REFERENCES ews.t_ili2db_basket (t_id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
DEFERRABLE INITIALLY DEFERRED,
CONSTRAINT ews_geologie_zulaessigkeit_fkey FOREIGN KEY (zulaessigkeit)
REFERENCES ews.zulaessigkeit_catalogue (t_id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
DEFERRABLE INITIALLY DEFERRED
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
</pre>
<p>Note the bigint data type for the primary key column.</p> QGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=887512018-03-15T08:05:24ZAndreas Neumann
<ul><li><strong>File</strong> <a href="/attachments/download/12454/qgis_transaction-mode-settings.png">qgis_transaction-mode-settings.png</a> added</li></ul> QGIS Application - Bug report #18397: Primary key problem when using the interactive "Merge selected features" tool in an editing sessionhttps://issues.qgis.org/issues/18397?journal_id=890762018-04-03T19:26:52ZNyall Dawson
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Closed</i></li></ul><p>Applied in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/615cb6ca71e14ea45252951f0ca3fe7e95343eb8" title="[needs-docs] In merge features dialog, if a layer has default values/default value clauses presen...">qgis|615cb6ca71e14ea45252951f0ca3fe7e95343eb8</a>.</p>