<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>I am forwarding this from the user list - if this is really the case that multi-column primary keys are violating the unique constraints of "individual" fields, than I need we need to properly deal with such cases.</p>
<p>Multi-column pkeys are quite common in some data models.</p>
<p>Any ideas how to fix/address this issue?</p>
<p>Thanks,</p>
<p>Andreas</p>
<p>-------- Original Message --------</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th align="right" valign="baseline" nowrap="nowrap">Subject:</th>
<td>[Qgis-user] Error editing PK values in "Add record" form</td>
</tr>
<tr>
<th align="right" valign="baseline" nowrap="nowrap">Date:</th>
<td>2018-03-08 08:31</td>
</tr>
<tr>
<th align="right" valign="baseline" nowrap="nowrap">From:</th>
<td>Rafa García Castillo <ragaca@gmail.com></td>
</tr>
<tr>
<th align="right" valign="baseline" nowrap="nowrap">To:</th>
<td>qgis-user@lists.osgeo.org</td>
</tr>
</tbody>
</table>
<p><br /></p>
<!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr"><span style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; float: none; display: inline;">  Hi everybody,</span>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;"> </div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">  I´m testing QGIS 3.0 in Windows 10. I think I have found an error in the "Add record" form when you are editing a PostgreSQL table without geometry and the table primary key (PK) is composed of two fields (or more) from the table.</div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;"> </div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">  I suppose QGIS thinks a PK field has to be unique, and that´s true for most of the cases, but when you have a PK composed of more than one field, is the combination of these fields what it has to be unique, not the fields individually. Now, in QGIS 3.0, if you write a value for one of the PK fields that it is already in the table, it doesn't let you insert that value, even if the combination of the values that compound the PK is unique.</div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;"> </div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">  I attach two screenshot: </div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">    -"Add record" button</div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">    -"Add record" form not letting you insert a value</div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;"> </div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">  Thanks in advance</div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;"> </div>
<div style="color: #222222; font-family: arial,sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration-style: initial; text-decoration-color: initial;">  Rafa</div>
<br />
<div> </div>
<div><img src="cid:15204957905aa0ecae1b8f6976415197@carto.net" width="34" height="32" /><br /><img src="cid:15204957905aa0ecae1bc9b272154944@carto.net" width="460" height="261" /><br /><br /></div>
</div>
<p><br /></p>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br /> Qgis-user mailing list<br /> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br /> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br /> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>

</body></html>