<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Alexander,</p>
    <p>You should not set an expression manually. If the id column is
      comes from a PostgreSQL identity/sequence based column, QGIS is
      get the exact id when the write operation is executed. It works
      fine with any number of users.</p>
    <p>Set you column with (on the PostgreSQL side):<br>
    </p>
    <p>id INT GENERATED ALWAYS AS IDENTITY</p>
    <p>I hope it helps.</p>
    <p>Jorge Gustavo<br>
    </p>
    <div class="moz-cite-prefix">On 13/09/21 07:27, Alexander Klemm -
      km3 teledienst GmbH wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:13db98bf-3d13-53a4-d32f-2134891c415c@km3.de">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hello,</p>
      <p>we want to use QGIS to document our cable Infrastructure (We
        are an ISP). Now the Problem is, that 3 or 4 persons have to
        work with QGIS. Now my Idea was to provide a Postgresql Server
        with postgis installed. Thats working fine. The Project and the
        Layers are stored into the Postgresql Server and all Persons
        could work with it. Now my Problem is, that the Contents of the
        Layers must have an unique ID. The ID is set by the default
        value at the attribute form with<i> "maximum($id)+1"</i>. If two
        persons are working on the QGIS System, the Problem is, that
        there are duplicated IDs, because the IDs will not be stored
        immediately. Is there a solution for this problem?</p>
      <p>thank you for helping<br>
        best regards</p>
      <p>Alexander Klemm<br>
      </p>
      <pre class="moz-signature" cols="72">Mit freundlichen Grüßen
Alexander Klemm</pre>
      <br>
      km3 teledienst GmbH - August-Bebel-Str. 86 - 08344
      Grünhain-Beierfeld<br>
      Tel. +49 (0)3774 13931-0 - Fax +49 (0)3774 13931-02<br>
      <a class="moz-txt-link-abbreviated" href="mailto:buero@km3.de">buero@km3.de</a> - <a class="moz-txt-link-freetext" href="https://www.km3.de">https://www.km3.de</a><br>
      Geschäftsführer: Heiko Lötzsch und Mike Bielagk<br>
      Registergericht: Amtsgericht Chemnitz - Handelsregister: B Nr.
      18881<br>
      Umsatzsteuer-ID: DE 216 086 551 - Steuer-Nr.: 218 / 112 / 02921<br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
  </body>
</html>