<div dir="ltr"><div>Hi Denis,<br><br></div>I just tested on Linux, with two simple shapefiles (attached), with only two lines each. Making a copy of the shapefiles, all goes well.<br><br>If you import the shapefiles to postgis (with dbmanager) to multilinestring, they stay with equal pkeys. When I do the copy / paste (which worked fine with the same data in shapefile format), QGIS shows the warning message "Paste features: no features could be successfully pasted.". Running QGIS with GNU gdb, does not appear any error at the time the warning is shown.<br><br>I also tested this with points, multipoints, and Multipolygons, and the same happens.<br><br>The proof that I believe show that the problem is in primary key is:<br><br>importing the two layers attached to the postgis with dbmanager, you get<br><br>layer_1<br>id_0* | id | desc<br>1 | 1 | 1<br>2 | 2 | 2<br><br>layer_2<br>id_0* | id | desc<br>1 | 1 | 1<br>2 | 2 | 2<br><br>*pkey<br><br>If I delete the second line of layer_2, and copy the second line of layer_1 and paste on layer_2, it already works, and layer_2 becomes:<br><br>layer_2<br>id_0* | id | desc<br>1 | 1 | 1<br>3 | 2 | 2<br><br>(id_0 is 3 because of the sequence).<br><br>The only explanation I find for this behavior is QGIS verify the violation of unique constraint of pkey field id_0, and launch the warning and prevent the pasting.<br><br>What do you think?<br><br>Thanks!<br><br>Best regards,<br>Pedro<br><br><br><br><div class="gmail_extra"><br><div class="gmail_quote">2014-10-02 14:42 GMT+01:00 Rouzaud Denis <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Pedro,<div><br></div><div>As said, copy/paste only tries to convert geometries and will paste if possible.</div><div><br></div><div>Foreign key violation is only detected by Postgis, so the reason why QGIS is not actually pasting is not due to a FKey violation.</div><div><br></div><div>Do you have a debugging environment or can you provide some demo data?</div><div><br></div><div>Best wishes,</div><div><br></div><div>Denis</div></div></blockquote></div></div></div>